]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Rename ChunkedCodingParser to TeChunkedParser
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 1 Jun 2015 21:41:37 +0000 (14:41 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 1 Jun 2015 21:41:37 +0000 (14:41 -0700)
src/adaptation/icap/ModXact.cc
src/adaptation/icap/ModXact.h
src/client_side.cc
src/client_side.h
src/http.cc
src/http.h
src/http/one/Makefile.am
src/http/one/TeChunkedParser.cc [moved from src/http/one/ChunkedCodingParser.cc with 91% similarity]
src/http/one/TeChunkedParser.h [moved from src/http/one/ChunkedCodingParser.h with 79% similarity]
src/http/one/forward.h

index d45339402fd46033dcb67c777d37bf9777392280..5c51e37622f632945b86666736dff5ad8e030568 100644 (file)
@@ -25,7 +25,7 @@
 #include "comm.h"
 #include "comm/Connection.h"
 #include "err_detail_type.h"
-#include "http/one/ChunkedCodingParser.h"
+#include "http/one/TeChunkedParser.h"
 #include "HttpHeaderTools.h"
 #include "HttpMsg.h"
 #include "HttpReply.h"
@@ -1104,7 +1104,7 @@ void Adaptation::Icap::ModXact::decideOnParsingBody()
         debugs(93, 5, HERE << "expecting a body");
         state.parsing = State::psBody;
         replyHttpBodySize = 0;
-        bodyParser = new Http1::ChunkedCodingParser;
+        bodyParser = new Http1::TeChunkedParser;
         makeAdaptedBodyPipe("adapted response from the ICAP server");
         Must(state.sending == State::sendingAdapted);
     } else {
index 56e4bc9d1a21b600ec878e9f2259a9891374f7a9..bd86881fd97e31320de63d02d1633a193b5c4487 100644 (file)
@@ -249,7 +249,7 @@ private:
     uint64_t virginConsumed;        // virgin data consumed so far
     Preview preview; // use for creating (writing) the preview
 
-    Http1::ChunkedCodingParser *bodyParser; // ICAP response body parser
+    Http1::TeChunkedParser *bodyParser; // ICAP response body parser
 
     bool canStartBypass; // enables bypass of transaction failures
     bool protectGroupBypass; // protects ServiceGroup-wide bypass of failures
index 0b0d430f0048203b6abb612aea3ccb3ebd3e3af8..b1ec85d2a7492ebb845c934a6c647bd7114e296a 100644 (file)
@@ -85,8 +85,8 @@
 #include "helper.h"
 #include "helper/Reply.h"
 #include "http.h"
-#include "http/one/ChunkedCodingParser.h"
 #include "http/one/RequestParser.h"
+#include "http/one/TeChunkedParser.h"
 #include "HttpHdrContRange.h"
 #include "HttpHeaderTools.h"
 #include "HttpReply.h"
@@ -4702,7 +4702,7 @@ ConnStateData::startDechunkingRequest()
     Must(bodyPipe != NULL);
     debugs(33, 5, HERE << "start dechunking" << bodyPipe->status());
     assert(!in.bodyParser);
-    in.bodyParser = new Http1::ChunkedCodingParser;
+    in.bodyParser = new Http1::TeChunkedParser;
 }
 
 /// put parsed content into input buffer and clean up
index cda233eb75e3bed6cf5463878c83df28418e597e..cd86fa4c69233cce14298ad66f12707db63e70f3 100644 (file)
@@ -207,7 +207,7 @@ public:
         ~In();
         bool maybeMakeSpaceAvailable();
 
-        Http1::ChunkedCodingParser *bodyParser; ///< parses chunked request body
+        Http1::TeChunkedParser *bodyParser; ///< parses chunked request body
         SBuf buf;
     } in;
 
index 6cf06412ad1066a4dd6f2734c5e526b7f16bdce3..7baec9ed5d1d2b6f8c8798a2ed09ee5d721b2efd 100644 (file)
@@ -30,8 +30,8 @@
 #include "fde.h"
 #include "globals.h"
 #include "http.h"
-#include "http/one/ChunkedCodingParser.h"
 #include "http/one/ResponseParser.h"
+#include "http/one/TeChunkedParser.h"
 #include "HttpControlMsg.h"
 #include "HttpHdrCc.h"
 #include "HttpHdrContRange.h"
@@ -788,7 +788,7 @@ HttpStateData::processReplyHeader()
     flags.chunked = false;
     if (newrep->sline.protocol == AnyP::PROTO_HTTP && newrep->header.chunked()) {
         flags.chunked = true;
-        httpChunkDecoder = new Http1::ChunkedCodingParser;
+        httpChunkDecoder = new Http1::TeChunkedParser;
     }
 
     if (!peerSupportsConnectionPinning())
index 6b812838a9f580f18d363794a56b5ca6237728fd..afa045807f5c8f6e5ec415e8a7562c3738dfb48e 100644 (file)
@@ -120,7 +120,7 @@ private:
 
     /// Parser being used at present to parse the HTTP/ICY server response.
     Http1::ResponseParserPointer hp;
-    Http1::ChunkedCodingParser *httpChunkDecoder;
+    Http1::TeChunkedParser *httpChunkDecoder;
 
     /// amount of message payload/body received so far.
     int64_t payloadSeen;
index 25dc303c5759011a6f705768d5acdaf6a649a910..33edb01dc64133c28ce7c54dda4828d36f25c37d 100644 (file)
@@ -11,12 +11,12 @@ include $(top_srcdir)/src/TestHeaders.am
 noinst_LTLIBRARIES = libhttp1.la
 
 libhttp1_la_SOURCES = \
-       ChunkedCodingParser.cc \
-       ChunkedCodingParser.h \
        forward.h \
        Parser.cc \
        Parser.h \
        RequestParser.cc \
        RequestParser.h \
        ResponseParser.cc \
-       ResponseParser.h
+       ResponseParser.h \
+       TeChunkedParser.cc \
+       TeChunkedParser.h
similarity index 91%
rename from src/http/one/ChunkedCodingParser.cc
rename to src/http/one/TeChunkedParser.cc
index 41d50ff10ffd85324c1b38b03111df710fa4093b..5fdfd7f0c5d99d929ff15b6974161c2339d4e925 100644 (file)
@@ -9,13 +9,13 @@
 #include "squid.h"
 #include "base/TextException.h"
 #include "Debug.h"
-#include "http/one/ChunkedCodingParser.h"
+#include "http/one/TeChunkedParser.h"
 #include "http/ProtocolVersion.h"
 #include "MemBuf.h"
 #include "parser/Tokenizer.h"
 #include "Parsing.h"
 
-Http::One::ChunkedCodingParser::ChunkedCodingParser()
+Http::One::TeChunkedParser::TeChunkedParser()
 {
     // chunked encoding only exists in HTTP/1.1
     Http1::Parser::msgProtocol_ = Http::ProtocolVersion(1,1);
@@ -24,7 +24,7 @@ Http::One::ChunkedCodingParser::ChunkedCodingParser()
 }
 
 void
-Http::One::ChunkedCodingParser::clear()
+Http::One::TeChunkedParser::clear()
 {
     parsingStage_ = Http1::HTTP_PARSE_NONE;
     buf_.clear();
@@ -34,7 +34,7 @@ Http::One::ChunkedCodingParser::clear()
 }
 
 bool
-Http::One::ChunkedCodingParser::parse(const SBuf &aBuf)
+Http::One::TeChunkedParser::parse(const SBuf &aBuf)
 {
     buf_ = aBuf; // sync buffers first so calls to remaining() work properly if nothing done.
 
@@ -71,7 +71,7 @@ Http::One::ChunkedCodingParser::parse(const SBuf &aBuf)
 }
 
 bool
-Http::One::ChunkedCodingParser::needsMoreSpace() const
+Http::One::TeChunkedParser::needsMoreSpace() const
 {
     assert(theOut);
     return parsingStage_ == Http1::HTTP_PARSE_CHUNK && !theOut->hasPotentialSpace();
@@ -79,7 +79,7 @@ Http::One::ChunkedCodingParser::needsMoreSpace() const
 
 /// RFC 7230 section 4.1 chunk-size
 bool
-Http::One::ChunkedCodingParser::parseChunkSize(::Parser::Tokenizer &tok)
+Http::One::TeChunkedParser::parseChunkSize(::Parser::Tokenizer &tok)
 {
     Must(theChunkSize <= 0); // Should(), really
 
@@ -114,7 +114,7 @@ Http::One::ChunkedCodingParser::parseChunkSize(::Parser::Tokenizer &tok)
  * ICAP 'use-original-body=N' extension is supported.
  */
 bool
-Http::One::ChunkedCodingParser::parseChunkExtension(::Parser::Tokenizer &tok, bool skipKnown)
+Http::One::TeChunkedParser::parseChunkExtension(::Parser::Tokenizer &tok, bool skipKnown)
 {
     // TODO implement a proper quoted-string Tokenizer method
     static const CharacterSet qString = CharacterSet("qString","\"\r\n").add('\0').complement();
@@ -170,7 +170,7 @@ Http::One::ChunkedCodingParser::parseChunkExtension(::Parser::Tokenizer &tok, bo
 }
 
 bool
-Http::One::ChunkedCodingParser::parseChunkBody(::Parser::Tokenizer &tok)
+Http::One::TeChunkedParser::parseChunkBody(::Parser::Tokenizer &tok)
 {
     Must(theLeftBodySize > 0); // Should, really
 
@@ -195,7 +195,7 @@ Http::One::ChunkedCodingParser::parseChunkBody(::Parser::Tokenizer &tok)
 }
 
 bool
-Http::One::ChunkedCodingParser::parseChunkEnd(::Parser::Tokenizer &tok)
+Http::One::TeChunkedParser::parseChunkEnd(::Parser::Tokenizer &tok)
 {
     Must(theLeftBodySize == 0); // Should(), really
 
similarity index 79%
rename from src/http/one/ChunkedCodingParser.h
rename to src/http/one/TeChunkedParser.h
index 9b22dcbb854396a3120050f3ff2530ca3437ac30..3ce25ed3cb5f25c85dac1142bc3b2e8cf1064f6b 100644 (file)
@@ -6,8 +6,8 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
-#ifndef SQUID_SRC_HTTP_ONE_CHUNKEDCODINGPARSER_H
-#define SQUID_SRC_HTTP_ONE_CHUNKEDCODINGPARSER_H
+#ifndef SQUID_SRC_HTTP_ONE_TeChunkedParser_H
+#define SQUID_SRC_HTTP_ONE_TeChunkedParser_H
 
 #include "http/one/Parser.h"
 
@@ -19,7 +19,7 @@ namespace One
 {
 
 /**
- * ChunkedCodingParser is an incremental parser for chunked transfer coding
+ * An incremental parser for chunked transfer coding
  * defined in RFC 7230 section 4.1.
  * http://tools.ietf.org/html/rfc7230#section-4.1
  *
@@ -28,11 +28,11 @@ namespace One
  * Ignores chunk extensions except for ICAP's ieof.
  * Trailers are available via mimeHeader() if wanted.
  */
-class ChunkedCodingParser : public Http1::Parser
+class TeChunkedParser : public Http1::Parser
 {
 public:
-    ChunkedCodingParser();
-    virtual ~ChunkedCodingParser() {theOut=NULL;/* we dont own this object */}
+    TeChunkedParser();
+    virtual ~TeChunkedParser() {theOut=NULL;/* we dont own this object */}
 
     /// set the buffer to be used to store decoded chunk data
     void setPayloadBuffer(MemBuf *parsedContent) {theOut = parsedContent;}
@@ -61,5 +61,5 @@ public:
 } // namespace One
 } // namespace Http
 
-#endif /* SQUID_SRC_HTTP_ONE_CHUNKEDCODINGPARSER_H */
+#endif /* SQUID_SRC_HTTP_ONE_TeChunkedParser_H */
 
index afb4b5b88f9841c9a10ad93b4fe9bb782422236b..678bc2c0de87c338390df6097a063ba76d331ee0 100644 (file)
@@ -17,7 +17,7 @@ namespace One {
 class Parser;
 typedef RefCount<Http::One::Parser> ParserPointer;
 
-class ChunkedCodingParser;
+class TeChunkedParser;
 
 class RequestParser;
 typedef RefCount<Http::One::RequestParser> RequestParserPointer;