Printer FriendlyEmail Article Link

Why do I see a blank HTTP Host: header and '400' bad request from the server from an HTTP re-direct in my Avalanche client side only test?

Answer

This usually occures when a re-direct is followed from a servers HTTP location: header that did not specificy the host.

i.e.
location: /page2.html

instead of:
location: https://www.spirent.com/page2.html

From RFC2616 section 14.23 Host

<…snip>

A client MUST include a Host header field in all HTTP/1.1 request messages . If the requested URI does not include an Internet host name for the service being requested, then the Host header field MUST be given with an empty value

<…snip>

All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message which lacks a Host header field.

<…snip>

 


Product : Avalanche,L4-7,App Testing,HTTP