I've been bit and don't want to be bit again, so I take all necessary measures.
Most dogs just want to play -- they try to run with you and get in front of your front tire. Still dangerous. Others want to bite -- they charge straight at you and, usually, try to bite your lower leg or ankle. The chargers get a snout full of bear repellant from me. (Yes, bear repellant. It has a much longer effective range and much higher concentration than Halt. Halt only stops playful dogs. Bear repellant will stop the mean ones -- although I've had a pitbull come back for a second blast.)
If the dog is loose and it charges, I get clear and call 911 for animal control.