Test results: https://github.com/Icinga/icinga2/issues/6514#issuecomment-
428155731
fixes #6514
}
m_State = HttpResponseEnd;
-
- if (m_Request->ProtocolVersion == HttpVersion10 || m_Request->Headers->Get("connection") == "close")
- m_Stream->Shutdown();
}
bool HttpResponse::Parse(StreamReadContext& src, bool may_wait)
}
m_RequestQueue.Enqueue(std::bind(&Stream::SetCorked, m_Stream, false));
+
+ /* Request finished, decide whether to explicitly close the connection. */
+ if (m_CurrentRequest.ProtocolVersion == HttpVersion10 ||
+ m_CurrentRequest.Headers->Get("connection") == "close") {
+ m_Stream->Shutdown();
+ close = true;
+ }
} else
close = true;