From ada1f18c8fd757447093fe936aa111eae9063a02 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Fri, 19 Feb 2016 14:26:00 -0700 Subject: [PATCH] Fix propagation of response status line parsing error details. This is a follow-up patch to trunk r14548 (Bug 4432). Now that the calling code is using the right field to get the parsing error details (parseStatusCode), we need to fix the code that sets those parsing error details [in case of response status line parsing errors]. TODO: To minimize chances of similar "I forgot to set parseStatusCode" bugs slipping through, hide that data member behind a method that returns scInvalidHeader (or a new scInternalSquidError) if parseError_ is still zero. Rename parseStatusCode to parseError_ and stop confusing it with the response status code. --- src/http/one/ResponseParser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/one/ResponseParser.cc b/src/http/one/ResponseParser.cc index 8414063a3c..1cf7613de2 100644 --- a/src/http/one/ResponseParser.cc +++ b/src/http/one/ResponseParser.cc @@ -231,7 +231,7 @@ Http::One::ResponseParser::parse(const SBuf &aBuf) // syntax errors already if (retcode < 0) { parsingStage_ = HTTP_PARSE_DONE; - statusCode_ = Http::scInvalidHeader; + parseStatusCode = Http::scInvalidHeader; return false; } } -- 2.47.3