]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Backing out last patch (httpHeaderGetSize()). The problem is elsewhere.
authorwessels <>
Sat, 6 May 2006 01:57:32 +0000 (01:57 +0000)
committerwessels <>
Sat, 6 May 2006 01:57:32 +0000 (01:57 +0000)
src/HttpHeader.cc
src/HttpMsg.cc
src/protos.h

index 94e4ad2ed4216def3c1dc47cdedfd47454f0087d..f233def5a94b2b47345a095fb740cdb25612b523 100644 (file)
@@ -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)
 {
index 6c11023f73a8f7cdef2dcc0b7673016ac4ab3a23..a769d5ed76c517f2a81838f92f2272c345107265 100644 (file)
@@ -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);
 }
index 3d6c1549606743787e9872ffa6ac09a9b7d5a3fb..635de7ff7776858c8e9ba5ca5a7abbd562f7091f 100644 (file)
@@ -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);