I was originally going to make a blog post about request smuggling, a vulnerability related to HTTP, but putting together the explanation of the protocol and the explanation of the vulnerability in one post is too long.
So let's vulgarize HTTP !
HTTP stands for Hyper transfer text protocol. HTTP is a communication protocol used to exchange data over the Web.
HTTP works as a client/server. Here's a quick analogy to help you understand
Let's imagine that in a restaurant, the customer sends a request to the restaurant's server (server) for a particular dish (a web resource, e.g. a page) using the menu (the web page you're on). The server then responds with the requested dish (the resource).
![]() |
---|
Client/server affair |
Just as the client can make several requests for different dishes, the browser can also make requests for different resources, such as images, web pages or videos. The server will respond to each request with the appropriate answer, just as a restaurant waiter would bring the requested dish to the table.
What's more, just as a restaurant can have different tables for different customers, a web server can handle multiple requests from different customers at the same time, serving different resources to each customer.
![]() |
---|
Multiples requests |
You may have heard the term STATELESS before, but you don't necessarily understand what it means for HTTP.
Let's take the example of a flight booking application. When a user performs a search for available flights, the server returns a list of results corresponding to the user's search criteria. If the user performs a new search for a different flight, the server doesn't remember the results of the previous search.
![]() |
---|
Stateless example |
In short, the "stateless" nature of HTTP means that each request is independent and doesn't retain information about previous requests, enabling greater scalability and optimization of server resources.
Nevertheless, many web applications do provide status, through cookies and session management, such as shopping carts and online shops.
Another point I wanted to address was the difference between URLs and URIs. Before the post, I had a tendency to get confused, so I thought if it's useful for me, maybe it'll be useful for you too!
URLs and URIs are identifiers used to locate resources on the Web.
![]() |
---|
URL example |
The difference with a URL is that a URI can also identify a resource using a unique name or address, even if the resource is not accessible online.
For example, the name of a book can be used as a URI to identify that book, even if it is not online.
![]() |
---|
URI example |
OSI stands for Open System Interconnection, and is the reference model for computer-to-computer communication.
I won't go back over the 7 layers of the OSI model, but you should know that HTTP is located on the highest layer of the OSI model, the application layer.
![]() |
---|
OSI Model |
99.9% of the time, HTTP uses TCP/IP as its transport protocol (unlike UDP).
We won't go into the details of the TCP protocol in this post, but simply, TCP defines how data is formatted, then sent from point A to point B.
However, as HTTP is on a layer above the transport layer, it doesn't care about all that. For HTTP, the only thing that matters is :
I want a resource, the server sends me a response
Now that we've covered the basics, let's take a look at what makes up an HTTP request, starting with the first term, the HTTP VERB.
HTTP verbs, also known as HTTP methods, are used to indicate the action to be performed on a resource during an HTTP request.
![]() |
---|
Get example |
![]() |
---|
Post example |
These are the main HTTP verbs, others exist, but we'll quickly go over them :
![]() |
---|
Options example |
![]() |
---|
Connect example |
Once you've defined the verb, you need to tell the server which resource you want, as you can see.
![]() |
---|
Path in red |
Once you've chosen the resource you want, you need to tell the server which version of HTTP you want to use.
Today, HTTP version 1.1 is the most common on the web, with HTTP version 2 on the rise.
The history of HTTP versions could be the subject of a whole blog post, but just remember that in :
![]() |
---|
HTTP pipelining |
HTTP headers are additional information sent with an HTTP request or response. These headers contain information such as content type, encoding, language, browser used and other information relevant to processing the request or response.
For example:
![]() |
---|
User-Agent header example |
HTTP headers are important because they enable the server and client to communicate in greater detail about the information being sent or expected. This enables better management of requests and responses, a better understanding of the client's needs and better security by specifying certain restrictions or authorizations.
Now that we've seen everything that makes up a request, let's move on to the response!
Once your request has been sent, several responses are possible. These responses contain a code called the HTTP response code.
This is a three-digit code sent by an HTTP server to indicate the result of a request made by a client.
There are five categories of HTTP response codes: 1xx, 2xx, 3xx, 4xx, and 5xx.
network-protocols-run-the-internet | bytebytego
http-keep-alive-pipelining-multiplexing-and-connection-pooling | haproxy
Hypertext_Transfer_Protocol | wikipedia
HTTP | mozilla