An HTTP RequestID/ResponseID mismatch is logged as only a warning if the response code is 5xx and the responseID is empty.

This commit is contained in:
Stephen Atherton 2019-03-05 11:56:36 -08:00 committed by Alex Miller
parent 2db2d5dbaa
commit 5980276aea
1 changed files with 8 additions and 1 deletions

View File

@ -389,8 +389,15 @@ namespace HTTP {
event.detail("RequestIDReceived", responseID);
if(requestID != responseID) {
err = http_bad_request_id();
// Log a non-debug a error
TraceEvent(SevError, "HTTPRequestFailedIDMismatch")
Severity sev = SevError;
// If the response code is 5xx (server error) and the responseID is empty then just warn
if(responseID.empty() && r->code >= 500 && r->code < 600) {
sev = SevWarnAlways;
}
TraceEvent(sev, "HTTPRequestFailedIDMismatch")
.detail("DebugID", conn->getDebugID())
.detail("RemoteAddress", conn->getPeerAddress())
.detail("Verb", verb)