Wikitravel articles have a stay safe section with location specific advice. This article contains general information relevant to many destinations.
Aggressive dogs are a common problem when travelling in places such as Asia, South America and some Eastern Europe countries like Romania. The dogs are often feral (and hence not used taking commands from people) and may be running round wild in packs, which can be extremely intimidating if you are confronted by one. The obvious precautions — travel in groups, avoid areas where the dogs are, don't go out at night when they are most active, and carry a walking stick if you must go — that will reduce the risks but do not eliminate them.
Such dogs are rarely rabid, but it is possible. Consider being vaccinated against rabies before travelling to such areas. See individual articles here for region-specific information and consult a physician (preferably one with expertise in travel medicine) for advice on vaccinations before you travel.
What to do when confronted by an aggressive dog
DO NOT RUN! Although it may seem counter-intuitive when you suddenly see an angry, barking and snarling dog running towards you, the most important thing to do is not to turn and run. The dog's natural instincts will kick in and it will chase after you.
Stay calm, don't make any sudden movements, and don't look the dog directly in the eye: dogs see this as a challenge and may react by becoming more aggressive.
Try to turn sideways on: this isn't necessarily a submissive gesture but will minimise the chance that the dog will see you as a threat.
In areas such as Iran, the locals' response on seeing dogs nearby is often to pick up a few stones to throw at them. The dogs will fairly often retreat if they see you bending over for ammo.
If you are confronted by a dog when bicycling a good thing to do is to grab your bicycle water bottle and throw water to the dog. This causes the dog to back off. When dismounting away from the dog, your bicycle can be a useful barrier.
If you are confronted by a dog when motorcycling, approach it slowly to upset its timing, then speed up to leave it behind.
What to do if you're attacked
If you're unlucky enough to get attacked, there are a number of things you can do to minimize the damage.
If you have an object (bag, coat, umbrella, etc.), you can hold out in front of you, offer this to the dog as it attacks. Alternatively, wrap some padding around your arm and use this. If the dog bites on this, keep hold of it: if you let go, the dog will realize that it's not part of you and go for something else.
Try using a pepper spray and spread it directly into the face. Repeat spreading until the dog goes away.
If you get bitten, don't yank yourself away from the dog; its teeth are designed to stop things being ripped out of it's mouth, Also, the animal's instincts will be to bite harder.
This is a usable article. It touches on all the major areas of the topic. An adventurous person could use this article, but please plunge forward and help it grow!