The HTTP request and HTTP response are examples of the packets we introduced in Chapter 1 that are produced by the application layer and sent down to the transport, network, data link, and physical layers for transmission through the network. The HTTP response and HTTP request are simple text files that take the information provided by the application (e.g., the URL to get) and format it in a structured way so that the receiver of the message can dearly understand it.
An HTTP request from a Web browser to a Web server has three parts. The first two
parts are required; the last is optional. The parts are
• The request line, which starts with a command (e.g., get), provides the Web page, and ends with the HTTP version number that the browser understands; the version number ensures that the Web server does not attempt to use a more advanced or newer version of the HTTP standard that the browser does not understand.
• The request header, which contains a variety of optional information such as the
Web browser being used (e.g., Internet Explorer) and the date.
• The request body, which contains information sent to the server, such as information that the user has typed into a form.
Figure 2-11 shows an example of an HTTP request for a page on our Web server, for•
matted using version 1.1 of the HTTP standard. This request has only the request line and