avoid error accessing optional header User-Agent
Merge pull request #2 from gfobe/master

avoid error accessing optional header User-Agent