HTTP Responses

by Jeff Hunter, Sr. Database Administrator


Introduction

HTTP is the protocol that underlies the WWW; the current version of HTTP is 1.0, although 1.1 is already widely deployed, and work is under way to define HTTP-NG. The response of a Web server varies with the type of request and whether or not the request could be serviced.

A simple response

A simple response of this form is only returned in response to a simple (HTTP 0.9) request, and consists of simply the requested document
  <body>

A full response

A full response includes the HTTP version number and a status code, followed by the body of the document. The status code indicates how successfully the request was serviced.
  HTTP/1.0 200 OK[CRLF][CRLF]
  <body>

A full response with headers

A full response may also include some headers that include additional information about the requested document, such as its content type, whether it is compressed and when it was last modified.
  HTTP/1.0 200 OK[CRLF]
  Content-Type: text/html[CRLF]
  Content-Encoding: x-gzip[CRLF][CRLF]
  <body>



Last modified on: Saturday, 18-Sep-2010 18:05:00 EDT
Page Count: 1887