From: Amos Jeffries Date: Sun, 22 Dec 2013 13:20:01 +0000 (-0800) Subject: Drop HttpParser MSGDODEBUG X-Git-Tag: merge-candidate-3-v1~506^2~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=242179c69e97a7ab80175096cff9416269fa3a3c;p=thirdparty%2Fsquid.git Drop HttpParser MSGDODEBUG --- diff --git a/src/HttpParser.cc b/src/HttpParser.cc index 240e4baa01..a4ae506231 100644 --- a/src/HttpParser.cc +++ b/src/HttpParser.cc @@ -260,45 +260,3 @@ HttpParserParseReqLine(HttpParser *hmsg) PROF_stop(HttpParserParseReqLine); return retcode; } - -#if MSGDODEBUG -/* XXX This should eventually turn into something inlined or #define'd */ -int -HttpParserReqSz(HttpParser *hp) -{ - assert(hp->state == HTTP_PARSE_NEW); - assert(hp->req.start != -1); - assert(hp->req.end != -1); - return hp->req.end - hp->req.start + 1; -} - -/* - * This +1 makes it 'right' but won't make any sense if - * there's a 0 byte header? This won't happen normally - a valid header - * is at -least- a blank line (\n, or \r\n.) - */ -int -HttpParserHdrSz(HttpParser *hp) -{ - assert(hp->state == HTTP_PARSE_NEW); - assert(hp->hdr_start != -1); - assert(hp->hdr_end != -1); - return hp->hdr_end - hp->hdr_start + 1; -} - -const char * -HttpParserHdrBuf(HttpParser *hp) -{ - assert(hp->state == HTTP_PARSE_NEW); - assert(hp->hdr_start != -1); - assert(hp->hdr_end != -1); - return hp->buf + hp->hdr_start; -} - -int -HttpParserRequestLen(HttpParser *hp) -{ - return hp->hdr_end - hp->req.start + 1; -} -#endif - diff --git a/src/HttpParser.h b/src/HttpParser.h index f8f0d768c9..ded60cf505 100644 --- a/src/HttpParser.h +++ b/src/HttpParser.h @@ -94,17 +94,9 @@ private: // Legacy functions int HttpParserParseReqLine(HttpParser *hp); -#define MSGDODEBUG 0 -#if MSGDODEBUG -int HttpParserReqSz(HttpParser *); -int HttpParserHdrSz(HttpParser *); -const char * HttpParserHdrBuf(HttpParser *); -int HttpParserRequestLen(HttpParser *hp); -#else #define HttpParserReqSz(hp) ( (hp)->req.end - (hp)->req.start + 1 ) #define HttpParserHdrSz(hp) ( (hp)->hdr_end - (hp)->hdr_start + 1 ) #define HttpParserHdrBuf(hp) ( (hp)->buf + (hp)->hdr_start ) #define HttpParserRequestLen(hp) ( (hp)->hdr_end - (hp)->req.start + 1 ) -#endif #endif /* _SQUID_SRC_HTTPPARSER_H */