From: hno <> Date: Thu, 27 Dec 2007 05:33:31 +0000 (+0000) Subject: Author: Christos Tsantilas X-Git-Tag: BASIC_TPROXY4~230 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81c07a23b7729d04747a9327d79db634da24cc1d;p=thirdparty%2Fsquid.git Author: Christos Tsantilas 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 --- diff --git a/src/ICAP/ChunkedCodingParser.cc b/src/ChunkedCodingParser.cc similarity index 97% rename from src/ICAP/ChunkedCodingParser.cc rename to src/ChunkedCodingParser.cc index a7b0e9261f..a3ef03f2dc 100644 --- a/src/ICAP/ChunkedCodingParser.cc +++ b/src/ChunkedCodingParser.cc @@ -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; } diff --git a/src/ICAP/ChunkedCodingParser.h b/src/ChunkedCodingParser.h similarity index 95% rename from src/ICAP/ChunkedCodingParser.h rename to src/ChunkedCodingParser.h index d6e1a6fba4..7eef57a606 100644 --- a/src/ICAP/ChunkedCodingParser.h +++ b/src/ChunkedCodingParser.h @@ -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)(); diff --git a/src/Makefile.am b/src/Makefile.am index 4c9b5391d7..7f6e4ff852 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/ICAP/TextException.cc b/src/TextException.cc similarity index 100% rename from src/ICAP/TextException.cc rename to src/TextException.cc diff --git a/src/ICAP/TextException.h b/src/TextException.h similarity index 100% rename from src/ICAP/TextException.h rename to src/TextException.h