]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Drop HttpParser MSGDODEBUG
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 22 Dec 2013 13:20:01 +0000 (05:20 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 22 Dec 2013 13:20:01 +0000 (05:20 -0800)
src/HttpParser.cc
src/HttpParser.h

index 240e4baa01d0f5fcb2c3b193938908ad689fbca2..a4ae506231dcadc22cae22fb62c7a9a0e9beb2ba 100644 (file)
@@ -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
-
index f8f0d768c9981a189f9e4739a4ee4e497e5d7264..ded60cf5050930ab128977496bc153900110f1d6 100644 (file)
@@ -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 */