HTTP/1.1

On this page 7

HTTP/1.1 is the text-based, request-response version of the Hypertext Transfer Protocol, first published in 1997 and still one of the most widely deployed Internet protocols for moving web pages, files and API data between clients and servers. It introduced persistent connections, the mandatory Host header, chunked transfer coding and richer caching controls, which together made large-scale virtual hosting and efficient browsing practical.

Its semantics now live in RFC 9110, while the wire format of version 1.1 is defined in RFC 9112. HTTP/2 and HTTP/3 reuse the same methods, status codes and headers but change how messages travel on the network, so HTTP/1.1 remains the reference point for understanding everything that followed.

How an HTTP/1.1 exchange works

An HTTP/1.1 exchange consists of a client sending a request message and a server returning a response message over a reliable byte stream, normally TCP on port 80 or TLS on port 443. Each message is plain ASCII text: a start line, a block of header fields, an empty line and an optional body.

The request start line carries the method, target and version, for example GET /index.html HTTP/1.1. The response start line carries the version, a three-digit status code and a reason phrase, such as HTTP/1.1 200 OK. Because the format is human-readable, an engineer can type a request by hand in a terminal session, which is one reason the protocol became so easy to debug and implement.

The following table lists the parts of a message and the role each one plays.

PartExamplePurpose
Start lineGET /docs HTTP/1.1States the action or the result
Header fieldsHost: example.orgCarry metadata about the message
Empty lineCRLF onlyMarks the end of the headers
Message bodyHTML, JSON or binary dataHolds the transferred content
Structure of an HTTP/1.1 message

The receiver determines where the body ends from the Content-Length header, from chunked transfer coding, or, for responses only, from the server closing the connection. Correct framing is essential, because every subsequent message on the same connection depends on it.

What HTTP/1.1 added to HTTP/1.0

HTTP/1.1 fixed the main performance and addressing weaknesses of HTTP/1.0, which opened a new TCP connection for almost every object and had no standard way to serve several websites from one IP address. The changes below shaped the modern web.

FeatureWhat it doesPractical effect
Persistent connectionsKeeps TCP open for many requestsFewer handshakes and lower latency
Host headerNames the requested siteEnables name-based virtual hosting
Chunked transfer codingSends a body in sized piecesAllows streaming of unknown length
Cache-ControlDefines freshness and revalidationPrecise browser and proxy caching
Range requestsFetches part of a resourceResumable downloads and video seeking
100 ContinueAsks permission before a large uploadAvoids sending rejected bodies
Key features introduced or standardized in HTTP/1.1

The mandatory Host header deserves special emphasis. Without it, a server receiving a request at one address could not tell which of hundreds of hosted domains the client wanted, so shared hosting and later content delivery networks depend directly on this single field.

Persistent connections, pipelining and head-of-line blocking

In HTTP/1.1, connections are persistent by default: the client and server keep the TCP connection open after a response unless one side sends Connection: close. This reuse avoids repeated TCP and TLS handshakes, each of which costs at least one network round trip.

The specification also allows pipelining, where a client sends several requests without waiting for each response. Responses must still return in strict request order, so one slow response delays every response behind it. This head-of-line blocking at the application layer, combined with buggy intermediaries, led browsers to disable pipelining almost universally.

Browsers instead open about six parallel connections per origin, a figure that varies by implementation. Web developers responded with workarounds such as domain sharding, image sprites and file concatenation, all of which became unnecessary or even harmful once HTTP/2 introduced multiplexed streams on a single connection.

How HTTP/1.1 compares with HTTP/2 and HTTP/3

HTTP/1.1, HTTP/2 and HTTP/3 share the same HTTP semantics, meaning identical methods, status codes and header meanings, but differ in message framing and transport. The comparison below shows where the versions diverge.

PropertyHTTP/1.1HTTP/2HTTP/3
Message formatPlain textBinary framesBinary frames
TransportTCPTCPQUIC over UDP
ConcurrencyOne request at a time per connectionMultiplexed streamsIndependent streams
Header compressionNoneHPACKQPACK
Head-of-line blockingApplication and TCP levelTCP level onlyLargely removed
EncryptionOptionalEffectively required by browsersAlways via TLS 1.3
Comparison of HTTP versions on the wire

Despite these differences, HTTP/1.1 remains the universal fallback. Load balancers often speak HTTP/2 or HTTP/3 to browsers and HTTP/1.1 to backend servers, and many embedded devices, command-line tools and internal services never move beyond it.

Security risks and common implementation mistakes

The flexibility of a text format creates parsing ambiguities that attackers exploit. The most serious class is HTTP request smuggling, in which a front-end proxy and a back-end server disagree about where one request ends because of conflicting Content-Length and Transfer-Encoding headers.

ProblemCauseRemedy
Request smugglingInconsistent body-length parsingReject ambiguous messages and normalize at the edge
Response splittingUnfiltered CRLF in header valuesValidate and encode header input
Cleartext exposurePlain HTTP without TLSServe everything over HTTPS
Slow-request exhaustionClients that send headers very slowlySet header and idle timeouts
Stale cachesMissing or wrong Cache-ControlDeclare explicit freshness rules
Typical HTTP/1.1 problems and their remedies

RFC 9112 tightened these rules: a message carrying both Transfer-Encoding and Content-Length must be treated as an error or handled with Transfer-Encoding taking priority, and recipients should reject obsolete line folding. Following the current specification rather than the older RFC 2616 text is the single most effective defense.

Stripped to the essentials

HTTP/1.1 is the set of rules a browser and a web server follow when they talk. The browser writes a short, readable note such as “please give me this page”, and the server answers with a status like “here it is” or “not found”, followed by the content.

Its big improvement was keeping the line open. Earlier, every picture on a page required hanging up and dialing again. With HTTP/1.1, one call can carry many requests in a row, which makes pages load faster. Its main limit is that answers still come back one at a time in order, which is why newer versions now handle many conversations at once.

Where it is applied

A hosting provider runs a single server with one IP address that serves 400 small business websites. When a visitor opens a shop’s homepage, the browser sends GET / HTTP/1.1 with Host: shop.example, and the web server uses that header to pick the correct site configuration and files. Without the Host header, this shared setup would require 400 separate addresses.

Behind the provider’s reverse proxy, which accepts HTTP/2 and HTTP/3 from visitors, the proxy forwards traffic to application servers over persistent HTTP/1.1 connections with a 60-second idle timeout. After an audit, the team configures the proxy to reject requests containing both Content-Length and Transfer-Encoding, closing a request smuggling gap. The result is stable shared hosting with fewer open connections and a measurable drop in backend connection setup time.