HTTP Getting started with HTTP HTTP/1.1


Example

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’t use RFC2616. Delete it from your hard drives, bookmarks, and burn (or responsibly recycle) any copies that are printed out.

Mark Nottingham, chair of the HTTP WG

The up-to-date specification of HTTP/1.1, that matches how HTTP is implemented today, is in new RFCs 723x:

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