When the client uses the Connection: close
header in the request message, this means that it wants the server to close the connection after sending the response message.
I thought that this header is only used in the request messages, but I have noticed that it is also used in the response messages. For example:
What does this header means when used in the response message?
I think that it means that the server will close the connection after sending the response the message (even if the client has used the Connection: keep-alive
header in its request message). Am I correct?
Best Answer
Yes, this is correct. The server can just say "I don't support your keep-alive request and will just close the connection when I am finished".
From RFC 2616, Section 14.10: