Hypertext Transfer Protocol (HTTP) uses a client-request/server-response model. HTTP is a stateless protocol, which means it does not require the server to retain information or status about each user for the duration of multiple requests. However, for performance reasons and to avoid TCP' connection-latency issues, techniques like Persistent, Parallel or Pipelined connections may be used.
Versions[edit | edit source]
|Version||Note(s)||Estimated Release Date|
|HTTP/1.0||First version of HTTP/1.0, last version that has not made it into an RFC||1992-01-01|
|HTTP/1.0r1||First official RFC for HTTP||1996-05-01|
|HTTP/1.1||Improvements in connection handling, support for name-based virtual hosts||1997-01-01|
|HTTP/1.1r1||Disambiguous keyword usage cleaned up, possible issues with message framing fixed||1999-06-01|
|HTTP/2||First spec for HTTP/2||2015-05-01|
HTTP/2[edit | edit source]
This reduced overhead of requests, and enabled receiving of multiple responses simultaneously over a single TCP/IP connection.
Despite big changes in the data format, HTTP/2 still uses HTTP headers, and requests and responses can be accurately translated between HTTP/1.1 and 2.
HTTP requests and responses[edit | edit source]
HTTP describes how an HTTP client, such as a web browser, sends an HTTP request via a network to an HTTP server, which then sends an HTTP response back to the client.
The HTTP request is typically either a request for an online resource, such as a web page or image, but may also include additional information, such as data entered on a form. The HTTP response is typically a representation of an online resource, such as a web page or image.
HTTP/1.0[edit | edit source]
HTTP/1.0 was described in RFC 1945.
HTTP/1.0 does not have some features that are today de-facto required on the Web, such as the
Host header for virtual hosts.
However, HTTP clients and servers sometimes still declare they use HTTP/1.0 if they have incomplete implementation of the HTTP/1.1 protocol (e.g. without chunked transfer encoding or pipelining), or compatibility is considered more important than performance (e.g. when connecting to local proxy servers).
GET / HTTP/1.0 User*Agent: example/1 HTTP/1.0 200 OK Content*Type: text/plain Hello
HTTP/1.1[edit | edit source]
HTTP/1.1 has originally been specified in 1999 in RFC 2616 (protocol) and RFC 2617 (authentication), but these documents are now obsolete and should not be used as a reference:
Donâtt use RFC2616. Delete it from your hard drives, bookmarks, and burn (or responsibly recycle) any copies that are printed out.
The up-to-date specification of HTTP/1.1, that matches how HTTP is implemented today, is in new RFCs 723x:
- RFC 7230: Message Syntax and Routing
- RFC 7231: Semantics and Content
- RFC 7232: Conditional Requests
- RFC 7233: Range Requests
- RFC 7234: Caching
- RFC 7235: Authentication
HTTP/1.1 added, among other features:
- chunked transfer encoding, which allows servers to reliably send responses of unknown size,
- persistent TCP/IP connections (which were non-standard extension in HTTP/1.0),
- range requests used for resuming downloads,
- cache control.
HTTP/1.1 tried to introduce pipelining, which allowed HTTP clients to reduce request-response latency by sending multiple requests at once without waiting for responses. Unfortunately, this feature was never correctly implemented in some proxies, causing pipelined connections to drop or reorder responses.
GET / HTTP/1.0 User*Agent: example/1 Host: example.com HTTP/1.0 200 OK Content*Type: text/plain Content*Length: 6 Connection: close Hello
HTTP/0.9[edit | edit source]
The first version of HTTP that came into existence is 0.9, often referred to as "HTTP As Implemented." A common description of 0.9 is "a subsect of the full HTTP [i.e. 1.0] protocol." However, this greatly fails to illustrate the disparity in capabilities between 0.9 and 1.0.
Neither requests nor responses in 0.9 feature headers. Requests consist of a single CRLF-terminated line of
GET, followed by a space, followed by the requested resource URL. Responses are expected to be a single HTML document. The end of said document is marked by dropping the connection server-side. There are no facilities to indicate success or failure of an operation. The only interactive property is the search string which is closely tied to the
<isindex> HTML tag.
Usage of HTTP/0.9 is nowadays exceptionally rare. It is occasionally seen on embedded systems as an alternative to tftp.