From: Michael Friedrich Date: Mon, 3 Dec 2018 13:40:50 +0000 (+0100) Subject: Add a code comment for connection: close handling X-Git-Tag: v2.10.3~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c8fba182c575f44ad277fd7d777441faf812b42;p=icinga2 Add a code comment for connection: close handling --- diff --git a/lib/remote/httpresponse.cpp b/lib/remote/httpresponse.cpp index ef0df7e81..de029b701 100644 --- a/lib/remote/httpresponse.cpp +++ b/lib/remote/httpresponse.cpp @@ -112,6 +112,12 @@ void HttpResponse::Finish() 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") m_Stream->Shutdown(); }