Pcornel
Web Infrastructure · HTTP

HTTP/1.1

Cheat sheet · https://pcornel.dk/topic.php?topic=6263

Back to the Topic

Answer

HTTP/1.1 sends requests and responses as text over a TCP connection, one exchange at a time per connection, with persistent (keep-alive) connections by default.

Remember

Host is mandatory. Connections persist unless Connection: close. A body is framed by Content-Length or Transfer-Encoding: chunked — never both. Browsers open several connections per host because each carries one request at a time.

First checks

  • curl -v --http1.1 https://<host>/ — raw request line and headers.
  • printf 'GET / HTTP/1.1\r\nHost: <host>\r\nConnection: close\r\n\r\n' | openssl s_client -quiet -connect <host>:443 -servername <host> — hand-written request.
  • Proxy upstream keepalive settings and connection counts (ss -tn state established dport = :<port>).

Verify in this order

TCP (+TLS) → request line + headers + body → response status + headers + body → connection reused or closed

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6263

Confirmation

Confirm action

Continue?