Fixed issue with double http requests (with and without authentication header)

This led to poor performance results for people protecting their
back-end with both user/pass and apikey. Fixed by Frank van Moorsel
(primevision), commited on his request by Wim Vandenberghe (Be-Mobile)
Merge pull request #2 from wimvdber/master

Fixed issue with double http requests (with and without authentication h...