Pepper spray. Get the bear spray from REI or a sporting goods store. Stops any dog-- it can even kill a dog. But dogs like pit bulls might need to be killed if they attack you, because it's the only way to make them stop sometimes. It can be a really nasty thing, not one to take lightly.
Beware crazy gun toting dog owners who not only refuse to control their animals, but go off the deep end if a cyclist pepper sprays their mutt. Maybe they love dogs, maybe they just hate bike riding commies. Who knows? But be very careful.
I carry bear spray but I loath to use the stuff.