I'm afraid to say that this is a/the problem with society today.
I say: Hello.
Moron says: F you.
I... Run away....
It's actually ok to meet aggression with aggression and, if you'll try it you'll be surprised at the results you'll get in your favour. Most of these people get away with it because people let them.
In this situation, after I was sworn at, I'd have mentioned that the next time his mutt was loose in my area I'd invite him to dinner and he can come right after he finishes looking, unsuccessfully, for his dog. Then I'd go and place my machete and half axe in full view by my side. I'll bet $50 that 99% of the people who act like him will back down.
It really is OK to treat stupid people as stupid. The fact that you don't realize that they know they are stupid isn't an excuse. Most of them are cowards and those that aren't can be dealt with or will end up dealing with the police.