From: Amos Jeffries Date: Tue, 20 May 2014 11:07:44 +0000 (-0700) Subject: Fix first-line debug display after dropping parsedCount_ X-Git-Tag: merge-candidate-3-v1~506^2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4cff82565acf1b8c9d2eb4e2b79831d52ec3712;p=thirdparty%2Fsquid.git Fix first-line debug display after dropping parsedCount_ --- diff --git a/src/http/one/RequestParser.cc b/src/http/one/RequestParser.cc index 8147a60abf..e446a16c60 100644 --- a/src/http/one/RequestParser.cc +++ b/src/http/one/RequestParser.cc @@ -339,8 +339,15 @@ Http::One::RequestParser::parse(const SBuf &aBuf) if (parsingStage_ == HTTP_PARSE_FIRST) { PROF_start(HttpParserParseReqLine); const int retcode = parseRequestFirstLine(); + + // first-line (or a look-alike) found successfully. + if (retcode > 0) { + buf.consume(firstLineSize()); // first line bytes including CRLF terminator are now done. + parsingStage_ = HTTP_PARSE_MIME; + } + debugs(74, 5, "request-line: retval " << retcode << ": from " << req.start << "->" << req.end << - " line={" << buf.length() << ", data='" << buf << "'}"); + " line={" << aBuf.length() << ", data='" << aBuf << "'}"); debugs(74, 5, "request-line: method " << req.m_start << "->" << req.m_end << " (" << method_ << ")"); debugs(74, 5, "request-line: url " << req.u_start << "->" << req.u_end << " (" << uri_ << ")"); debugs(74, 5, "request-line: proto " << req.v_start << "->" << req.v_end << " (" << msgProtocol_ << ")"); @@ -352,12 +359,6 @@ Http::One::RequestParser::parse(const SBuf &aBuf) parsingStage_ = HTTP_PARSE_DONE; return false; } - - // first-line (or a look-alike) found successfully. - if (retcode > 0) { - buf.consume(firstLineSize()); // first line bytes including CRLF terminator are now done. - parsingStage_ = HTTP_PARSE_MIME; - } } // stage 3: locate the mime header block