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.
// syntax errors already
if (retcode < 0) {
parsingStage_ = HTTP_PARSE_DONE;
- statusCode_ = Http::scInvalidHeader;
+ parseStatusCode = Http::scInvalidHeader;
return false;
}
}