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

link|improve this question
feedback

4 Answers

All that information is in HTTP 1.1 - RFC 2616

link|improve this answer
feedback

That is not HTTP header information, it is TCP/IP packet header information.

Port and sequence numbers are used to deliver packets which is at a much lower level than HTTP. HTTP is an application level protocol and its headers don't deal with anything at the packet level.

What are you trying to do or look for?

link|improve this answer
You are right, my example above is from a TCP header. Like I said I look for the mandatory absolute minimum required fields a HTTP request header needs to contain like Host, Accept-Encoding, User-Agent, Date, Content-Length, Connection, Authorization – Stephan Kristyn Jul 23 '10 at 18:44
@user49173 Ok, just looked like you were confusing them since you don't mention anything about packet headers in the question. – squillman Jul 23 '10 at 18:45
feedback

None of the header fields you mention are strictly required. "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.

link|improve this answer
feedback

I did a bit research myself and you are right @gbroiles. For Name Based Virtual Hosting a Browser with HTTP 1.1 is required in general. The browsers sends the hostname in the host header and the Web server serves name based virtual hosts if configured.

With older browsers and HTTP 1.0 that is somewhat possible, but you need a workaround like apache's ServerPath Directive. Luckily newer browsers implement extensions when using HTTP 1.0 to ensure sending the host header field.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.