When biking, I have successfully given a "nice doggie" response. It usually works and most dogs seem dreadfully confused...I do keep the bicycle between me and the pooch, just in case sterner measures are required.
_________________________
Geezer in Chief