Vol. I · No. 46The protocol sectionSat, 10 Oct 2026
Layer 7 · Application protocol

HTTP

the HyperText Transfer Protocol

HTTP is the request-and-response language of the web. A client asks for a resource with a method and a path, the server answers with a status code, headers and a body, and each exchange stands on its own — simple, text-based, and everywhere.

HTTP is a request and a response — the client asks, the server answers, one exchange at a time.

You can run this one

Open the HTTP lab →

One request, one response—in plain text. Then watch a single page turn out to need four of them, and a revisit that sends no page at all.

Beginner
Operates at
Layer 7
Application
Port
80 · 443
443 = HTTPS
Model
Request / response
client asks first
State
Stateless
cookies add memory

How it works

The client asks, the server answers
BrowserWeb server
Request
GET /index.html HTTP/1.1
Host: example.com
Accept: text/html
Response
HTTP/1.1 200 OK
Content-Type: text/html
<!doctype html> … the page

A method and path go up, a status code and body come back. The server keeps no memory of the request once it’s answered.

The main points

What HTTP does, step by step

1
Open a connection

The browser resolves the name via DNS and opens a TCP connection — wrapped in TLS for HTTPS.

2
Send a request

A method (GET, POST…), a path and headers — optionally a body for data being submitted.

3
Server responds

A status code (200, 404, 500…), headers describing the content, and the body itself.

4
Reuse or close

The connection is kept alive for more requests, or closed. State is carried by cookies and tokens, not HTTP itself.

In cybersecurity

Plain HTTP is readable and forgeable in transit, and its flexibility makes the app above it the web’s biggest attack surface.

Use HTTPS

Plain HTTP is sniffable and modifiable en route — TLS makes it HTTPS.

Injection & XSS

Unsanitised parameters and bodies feed SQL injection and cross-site scripting.

Session hijacking

Stealing a cookie steals the session — mark cookies Secure and HttpOnly.

Security headers

HSTS, CSP and CORS headers harden a site against whole classes of attack.

Request smuggling

Disagreements over request boundaries let attackers sneak requests past proxies.

CSRF

Because requests carry cookies automatically, forged cross-site requests need tokens to stop.

Rides in the stack

IPTCPTLSHTTP

Works with

HTTP/2TLSWebSocketDNS

See it on Linux

aptdnfsscurlwget

Methods & status codes

Methods
GETread
POSTcreate
PUTreplace
DELETEremove
Status
2xxok
3xxredirect
4xxyou erred
5xxserver erred