From: wessels <> Date: Sat, 6 May 2006 01:57:32 +0000 (+0000) Subject: Backing out last patch (httpHeaderGetSize()). The problem is elsewhere. X-Git-Tag: SQUID_3_0_PRE4~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=568a83f6b4d80f3c747193346b4718aaa3cf3a6d;p=thirdparty%2Fsquid.git Backing out last patch (httpHeaderGetSize()). The problem is elsewhere. --- diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 94e4ad2ed4..f233def5a9 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.cc,v 1.113 2006/05/05 18:16:26 wessels Exp $ + * $Id: HttpHeader.cc,v 1.114 2006/05/05 19:57:32 wessels Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -1118,27 +1118,6 @@ httpHeaderGetInt(const HttpHeader * hdr, http_hdr_type id) return -1; } -/* - * This is copied from Squid-2 code, which uses squid_off_t instead - * of int, and ftSize instead of ftInt - */ -int -httpHeaderGetSize(const HttpHeader * hdr, http_hdr_type id) -{ - HttpHeaderEntry *e; - int value = -1; - int ok; - assert_eid(id); - assert(Headers[id].type == ftInt); /* must be of an appropriate type */ - - if ((e = httpHeaderFindEntry(hdr, id))) { - ok = httpHeaderParseSize(e->value.buf(), &value); - httpHeaderNoteParsedEntry(e->id, e->value, !ok); - } - - return value; -} - time_t httpHeaderGetTime(const HttpHeader * hdr, http_hdr_type id) { diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index 6c11023f73..a769d5ed76 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpMsg.cc,v 1.27 2006/05/05 18:16:26 wessels Exp $ + * $Id: HttpMsg.cc,v 1.28 2006/05/05 19:57:32 wessels Exp $ * * DEBUG: section 74 HTTP Message * AUTHOR: Alex Rousskov @@ -338,7 +338,7 @@ void HttpMsg::packInto(Packer *p, bool full_uri) const void HttpMsg::hdrCacheInit() { - content_length = httpHeaderGetSize(&header, HDR_CONTENT_LENGTH); + content_length = httpHeaderGetInt(&header, HDR_CONTENT_LENGTH); assert(NULL == cache_control); cache_control = httpHeaderGetCc(&header); } diff --git a/src/protos.h b/src/protos.h index 3d6c154960..635de7ff77 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.525 2006/05/05 18:16:26 wessels Exp $ + * $Id: protos.h,v 1.526 2006/05/05 19:57:32 wessels Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -349,7 +349,6 @@ class HttpHdrRange; SQUIDCEXTERN void httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange * range); SQUIDCEXTERN void httpHeaderPutExt(HttpHeader * hdr, const char *name, const char *value); SQUIDCEXTERN int httpHeaderGetInt(const HttpHeader * hdr, http_hdr_type id); -SQUIDCEXTERN int httpHeaderGetSize(const HttpHeader * hdr, http_hdr_type id); SQUIDCEXTERN time_t httpHeaderGetTime(const HttpHeader * hdr, http_hdr_type id); SQUIDCEXTERN TimeOrTag httpHeaderGetTimeOrTag(const HttpHeader * hdr, http_hdr_type id); SQUIDCEXTERN HttpHdrCc *httpHeaderGetCc(const HttpHeader * hdr);