The response from the server to the browser is very similar to the HTTP
request. It, too, has three parts, with the first required and the last two optional:
format of an HTTP
• The response status, which contains the HTTP version number the server has used, a status code (e.g., 200 means "OK"; 404 means "not found"), and a reason phrase (a text description of the status code).
• The response header, which contains a variety of optional information, such as the
Web server being used (e.g., Apache), the date, and the exact URL of the page in the response.
• The response body, which is the Web page itself.
Figure 2-12 shows an example of a response from our Web server to the request in Figure 2- I I. This example has all three parts. The response status reports "OK," which means the requested URL was found and is included in the response body. The response header provides the date, the type of Web server software used, the actual URL included in the response body, and the type of file. In most cases, the actual URL and the requested URL are the same, but not always. For example, if you request an URL but do not specify a file name (e.g., www.indiana.edu), you will receive whatever file is defined as the home page for
that server, so the actual URL will be different from the requested URL.