Httpheader fixes and tests update

As requested by @Montellese in PR #3948, I updated HttpHeader tests.
New test allow me to discover small bugs, that were fixed.