mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Add a code comment for connection: close handling
This commit is contained in:
parent
080f666b55
commit
1c8fba182c
@ -112,6 +112,12 @@ void HttpResponse::Finish()
|
|||||||
|
|
||||||
m_State = HttpResponseEnd;
|
m_State = HttpResponseEnd;
|
||||||
|
|
||||||
|
/* Close the connection on
|
||||||
|
* a) HTTP/1.0
|
||||||
|
* b) Connection: close in the sent header.
|
||||||
|
*
|
||||||
|
* Do this here and not in DataAvailableHandler - there might still be incoming data in there.
|
||||||
|
*/
|
||||||
if (m_Request->ProtocolVersion == HttpVersion10 || m_Request->Headers->Get("connection") == "close")
|
if (m_Request->ProtocolVersion == HttpVersion10 || m_Request->Headers->Get("connection") == "close")
|
||||||
m_Stream->Shutdown();
|
m_Stream->Shutdown();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user