From efbfe4c006cfb6e0bf3ee4ed57d0657c0cd85c19 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 6 Sep 2010 14:29:36 +0000 Subject: 2010-09-06 Tatsuhiro Tsujikawa Data from remote server in HTTP/FTP download are now written to the disk(or memory) through StreamFilter. Decoding chunked and gziped streams are done cascading StreamFilter. Removed inefficient 1byte read code. * src/ChunkedDecodingStreamFilter.cc * src/ChunkedDecodingStreamFilter.h * src/DownloadCommand.cc * src/DownloadCommand.h * src/GZipDecodingStreamFilter.cc * src/GZipDecodingStreamFilter.h * src/HttpConnection.cc * src/HttpDownloadCommand.cc * src/HttpResponse.cc * src/HttpResponse.h * src/HttpResponseCommand.cc * src/HttpResponseCommand.h * src/HttpSkipResponseCommand.cc * src/HttpSkipResponseCommand.h * src/Makefile.am * src/NullSinkStreamFilter.cc * src/NullSinkStreamFilter.h * src/RequestGroup.cc * src/SinkStreamFilter.cc * src/SinkStreamFilter.h * src/StreamFilter.cc * src/StreamFilter.h * test/ChunkedDecodingStreamFilterTest.cc * test/GZipDecodingStreamFilterTest.cc * test/HttpResponseTest.cc * test/Makefile.am * test/MockSegment.h --- src/HttpSkipResponseCommand.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/HttpSkipResponseCommand.h') diff --git a/src/HttpSkipResponseCommand.h b/src/HttpSkipResponseCommand.h index 2a865cf7..7fb1769d 100644 --- a/src/HttpSkipResponseCommand.h +++ b/src/HttpSkipResponseCommand.h @@ -41,7 +41,7 @@ namespace aria2 { class HttpConnection; class HttpResponse; -class Decoder; +class StreamFilter; class HttpSkipResponseCommand : public AbstractCommand { private: @@ -49,7 +49,9 @@ private: SharedHandle httpResponse_; - SharedHandle transferEncodingDecoder_; + SharedHandle streamFilter_; + + bool sinkFilterOnly_; uint64_t totalLength_; @@ -72,7 +74,7 @@ public: virtual ~HttpSkipResponseCommand(); - void setTransferEncodingDecoder(const SharedHandle& decoder); + void installStreamFilter(const SharedHandle& streamFilter); void disableSocketCheck(); }; -- cgit