
The User-agent: header line specifies the user agent, that is, the browser type that is making the request to the server. But, as we’ll see very soon, the information provided by the host header line is required by Web proxy caches.īy including the Connection: close header line, the browser is telling the server that it doesn’t want to bother with persistent connections it wants the server to close the connection after sending the requested object. You might think that this header line is unnecessary, as there is already a TCP connection in place to the host.

The header line Host: specifies the host on which the object resides. Now let’s look at the header lines in the example. The version is self-explanatory in this example, the browser implements version HTTP/1.1. In this example, the browser is requesting the object /somedir/page.html. The GET method is used from the browser requests an object, with the requested object identified in the URL field. The great majority of HTTP request messages use the GET method. The method field can take on several different values, including GET, POST, HEAD, PUT, and DELETE. The request line has three fields: the method field, the URL field, and the HTTP version field. The first line of an HTTP request message is called the request line the subsequent lines are called the header lines. Although this particular request message has five line, a request message can have many more lines or as few as one line.

The last line is followed by an additional carriage return and line feed.

Secondly, we see that the message consists of five lines, each followed by a carriage return and a line feed. First of all, we see that the message is written in ordinary ADCII text, so that your ordinary computer-literate human being can read it. We can learn a lot by taking a close look at this simple request message.
