From: Amos Jeffries Date: Tue, 31 Dec 2013 16:14:57 +0000 (-0800) Subject: Make the Http1Parser::request_offets details private X-Git-Tag: merge-candidate-3-v1~506^2~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ff9a17a09492d693c3425ebe3b932be99099015;p=thirdparty%2Fsquid.git Make the Http1Parser::request_offets details private --- diff --git a/src/client_side.cc b/src/client_side.cc index f937d20f11..dea06e9581 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2346,7 +2346,10 @@ parseHttpRequest(ConnStateData *csd, const Http::Http1ParserPointer &hp) // XXX: crop this dump at the end of headers. No need for extras debugs(11, 2, "HTTP Client " << csd->clientConnection); - debugs(11, 2, "HTTP Client REQUEST:\n---------\n" << (hp->buf) + hp->req.m_start << "\n----------"); + debugs(11, 2, "HTTP Client REQUEST:\n---------\n" << + hp->method() << " " << hp->requestUri() << " " << hp->messageProtocol() << "\n" << + hp->rawHeaderBuf() << + "\n----------"); result->flags.parsed_ok = 1; return result; diff --git a/src/http/Http1Parser.h b/src/http/Http1Parser.h index f981e1049b..bee6de298d 100644 --- a/src/http/Http1Parser.h +++ b/src/http/Http1Parser.h @@ -83,14 +83,6 @@ public: const char *buf; int bufsiz; - /// Offsets for pieces of the (HTTP request) Request-Line as per RFC 2616 - struct request_offsets { - int start, end; - int m_start, m_end; // method - int u_start, u_end; // url - int v_start, v_end; // version (full text) - } req; - /// the protocol label for this message const AnyP::ProtocolVersion & messageProtocol() const {return msgProtocol_;} @@ -111,6 +103,14 @@ private: bool skipGarbageLines(); int parseRequestFirstLine(); + /// Offsets for pieces of the (HTTP request) Request-Line as per RFC 2616 + struct request_offsets { + int start, end; + int m_start, m_end; // method + int u_start, u_end; // url + int v_start, v_end; // version (full text) + } req; + /// byte offset for non-parsed region of the buffer size_t parseOffset_;