user6514731
user6514731

Reputation:

Understand HTTP connection status/state

"In HTTP 1.1, all connections are considered persistent unless declared otherwise"

I found this line in wikipedia, but how this is true, since we know that's http is stateless connection?

Upvotes: 0

Views: 383

Answers (1)

Adrien
Adrien

Reputation: 1207

Persistent connections is not an issue of statefulness.

Messages and their corresponding responses are stateless compared to other messages and responses.

Whether a TCP connection supports multiple requests (in sequence) is an orthogonal issue.

So this statement is just basically saying that by default if a client makes a request labelled as HTTP/1.1, then it supports keeping the connection alive after the response, so that it can be used for another message.

This also implies that the client supports chunking, since this is the only way to keep a connection alive after a response of unknown length.

Upvotes: 2

Related Questions