35

What is the mandatory information a HTTP Request Header must contain ?

2 Answers2

48

GET / HTTP/1.0 is a legal HTTP request.

If there's no Host header field, you may not get the results you were hoping for if the destination server is a virtual host that doesn't have its own IP address to distinguish itself from other virtual hosts.

HTTP 1.1 requires the Host field.

gbroiles
  • 1,424
1

None of the HTTP Headers are required in an HTTP/1.0 Request. There are no required Response headers either.

All that and more in HTTP 1.1 - RFC 2616

Chris S
  • 78,455