]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
authorhno <>
Thu, 27 Dec 2007 05:33:31 +0000 (05:33 +0000)
committerhno <>
Thu, 27 Dec 2007 05:33:31 +0000 (05:33 +0000)
Bug #1148: Move Chunked decoding from src/ICAP to src/ to allow it to be used outside ICAP

This is a preparation for adding chunked decoding of HTTP messages

src/ChunkedCodingParser.cc [moved from src/ICAP/ChunkedCodingParser.cc with 97% similarity]
src/ChunkedCodingParser.h [moved from src/ICAP/ChunkedCodingParser.h with 95% similarity]
src/Makefile.am
src/TextException.cc [moved from src/ICAP/TextException.cc with 100% similarity]
src/TextException.h [moved from src/ICAP/TextException.h with 100% similarity]

similarity index 97%
rename from src/ICAP/ChunkedCodingParser.cc
rename to src/ChunkedCodingParser.cc
index a7b0e9261f017dcdc5b144c7906f0545f7f2cd9b..a3ef03f2dc9af167f723a345267168157bbafbd6 100644 (file)
@@ -64,7 +64,7 @@ void ChunkedCodingParser::parseChunkBeg()
     size_t crlfEnd = 0;
 
     if (findCrlf(crlfBeg, crlfEnd)) {
-        debugs(93,7, "found chunk-size end: " << crlfBeg << "-" << crlfEnd);
+        debugs(94,7, "found chunk-size end: " << crlfBeg << "-" << crlfEnd);
         int64_t size = -1;
         const char *p = 0;
 
@@ -76,7 +76,7 @@ void ChunkedCodingParser::parseChunkBeg()
 
             theIn->consume(crlfEnd);
             theChunkSize = theLeftBodySize = size;
-            debugs(93,7, "found chunk: " << theChunkSize);
+            debugs(94,7, "found chunk: " << theChunkSize);
             theStep = theChunkSize == 0 ? psTrailer : psChunkBody;
             return;
         }
similarity index 95%
rename from src/ICAP/ChunkedCodingParser.h
rename to src/ChunkedCodingParser.h
index d6e1a6fba4687c42e54e68b90a9279bb3c8873c7..7eef57a606c0f28ef5607d0ed238c2c3e33660b8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ChunkedCodingParser.h,v 1.3 2007/08/13 17:20:53 hno Exp $
+ * $Id: ChunkedCodingParser.h,v 1.1 2007/12/26 22:33:32 hno Exp $
  * 
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  * ----------------------------------------------------------
@@ -54,7 +54,6 @@ public:
 
     bool needsMoreData() const;
     bool needsMoreSpace() const;
-    bool sawIeof; // saw ieof chunk extension after a 0-size chunk
 
 private:
     typedef void (ChunkedCodingParser::*Step)();
index 4c9b5391d7cb23083b2b97b14a3f215aa55c92a4..7f6e4ff8529f3a284f969e4b142ce5d2c94ea43b 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.am,v 1.194 2007/12/14 23:11:45 amosjeffries Exp $
+#  $Id: Makefile.am,v 1.195 2007/12/26 22:33:31 hno Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -433,6 +433,8 @@ squid_SOURCES = \
        carp.cc \
        cbdata.cc \
        cbdata.h \
+       ChunkedCodingParser.cc \
+       ChunkedCodingParser.h \
        client_db.cc \
        client_side.cc \
        client_side.h \
@@ -610,6 +612,8 @@ squid_SOURCES = \
        structs.h \
        SwapDir.cc \
        SwapDir.h \
+       TextException.cc \
+       TextException.h \
        time.cc \
        tools.cc \
        tunnel.cc \
@@ -682,8 +686,6 @@ squid_DEPENDENCIES = $(top_builddir)/lib/libmiscutil.a \
 ICAP_libicap_a_SOURCES = \
        ICAP/AsyncJob.cc \
        ICAP/AsyncJob.h \
-       ICAP/ChunkedCodingParser.cc \
-       ICAP/ChunkedCodingParser.h \
        ICAP/ICAPClient.cc \
        ICAP/ICAPClient.h \
        ICAP/ICAPInitiator.cc \
@@ -706,9 +708,7 @@ ICAP_libicap_a_SOURCES = \
        ICAP/ICAPServiceRep.cc \
        ICAP/ICAPServiceRep.h \
        ICAP/ICAPXaction.cc \
-       ICAP/ICAPXaction.h \
-       ICAP/TextException.cc \
-       ICAP/TextException.h
+       ICAP/ICAPXaction.h
 
 
 unlinkd_SOURCES = unlinkd_daemon.cc SquidNew.cc
@@ -784,6 +784,8 @@ ufsdump_SOURCES = \
        CacheDigest.cc \
        carp.cc \
        cbdata.cc \
+       ChunkedCodingParser.cc \
+       ChunkedCodingParser.h \
        client_db.cc \
        client_side.cc \
        client_side_reply.cc \
@@ -886,6 +888,8 @@ ufsdump_SOURCES = \
        store_swapout.cc \
        structs.h \
        SwapDir.cc \
+       TextException.cc \
+       TextException.h \
        tools.cc \
        typedefs.h \
        $(UNLINKDSOURCE) \
@@ -1320,6 +1324,7 @@ tests_testCacheManager_SOURCES = \
        CacheDigest.cc \
        carp.cc \
        cbdata.cc \
+       ChunkedCodingParser.cc \
        client_db.cc \
        client_side.cc \
        client_side_reply.cc \
@@ -1410,6 +1415,7 @@ tests_testCacheManager_SOURCES = \
        StoreMetaURL.cc \
        StoreMetaVary.cc \
        StoreSwapLogData.cc \
+       TextException.cc \
        tools.cc \
        tunnel.cc \
        SwapDir.cc \
@@ -1486,6 +1492,7 @@ tests_testEvent_SOURCES = \
        CacheDigest.cc \
        carp.cc \
        cbdata.cc \
+       ChunkedCodingParser.cc \
        client_db.cc \
        client_side.cc \
        client_side_reply.cc \
@@ -1575,6 +1582,7 @@ tests_testEvent_SOURCES = \
        StoreMetaURL.cc \
        StoreMetaVary.cc \
        StoreSwapLogData.cc \
+       TextException.cc \
        tools.cc \
        tunnel.cc \
        SwapDir.cc \
@@ -1638,6 +1646,7 @@ tests_testEventLoop_SOURCES = \
        CacheDigest.cc \
        carp.cc \
        cbdata.cc \
+       ChunkedCodingParser.cc \
        client_db.cc \
        client_side.cc \
        client_side_reply.cc \
@@ -1727,6 +1736,7 @@ tests_testEventLoop_SOURCES = \
        StoreMetaURL.cc \
        StoreMetaVary.cc \
        StoreSwapLogData.cc \
+       TextException.cc \
        tools.cc \
        tunnel.cc \
        SwapDir.cc \
@@ -1814,6 +1824,7 @@ tests_test_http_range_SOURCES = \
        CacheDigest.cc \
        carp.cc \
        cbdata.cc \
+       ChunkedCodingParser.cc \
        client_db.cc \
        client_side.cc \
        client_side_reply.cc \
@@ -1909,6 +1920,7 @@ tests_test_http_range_SOURCES = \
        StoreSwapLogData.cc \
        String.cc \
        SwapDir.cc \
+       TextException.cc \
        time.cc \
        tools.cc \
        tunnel.cc \
@@ -1973,6 +1985,7 @@ tests_testHttpRequest_SOURCES = \
        CacheDigest.cc \
        carp.cc \
        cbdata.cc \
+       ChunkedCodingParser.cc \
        client_db.cc \
        client_side.cc \
        client_side_reply.cc \
@@ -2063,6 +2076,7 @@ tests_testHttpRequest_SOURCES = \
        StoreMetaURL.cc \
        StoreMetaVary.cc \
        StoreSwapLogData.cc \
+       TextException.cc \
        tools.cc \
        tunnel.cc \
        SwapDir.cc \
@@ -2329,6 +2343,7 @@ tests_testURL_SOURCES = \
        CacheDigest.cc \
        carp.cc \
        cbdata.cc \
+       ChunkedCodingParser.cc \
        client_db.cc \
        client_side.cc \
        client_side_reply.cc \
@@ -2418,6 +2433,7 @@ tests_testURL_SOURCES = \
        StoreMetaURL.cc \
        StoreMetaVary.cc \
        StoreSwapLogData.cc \
+       TextException.cc \
        tools.cc \
        tunnel.cc \
        SwapDir.cc \
similarity index 100%
rename from src/ICAP/TextException.h
rename to src/TextException.h