Gal Hyams
Gal Hyams

Reputation: 346

How to prevent keep-alive in a HTTP 1.1 request?

I'm implementing a simple HTTP client.

Which header should I add to a HTTP 1.1 request so it won't keep alive?

Upvotes: 10

Views: 8115

Answers (1)

Opal
Opal

Reputation: 84854

You need to add header: Connection: close. Currently all connections are permanent and client must explicitly claim that it wants to close the connection.

Upvotes: 12

Related Questions