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
-
// 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 */