Merge pull request #2 from meh2481/master

Fix include order for MinGW Windows
Remove unnecessary #undef
Fix possible crash in HTTP header parsing code
Merge pull request #1 from fgenesis/master

merge from upstream