diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-07-31 12:42:28 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-07-31 12:42:28 +0000 |
| commit | d3f05f44b73978f63279e8d1303885335312a741 (patch) | |
| tree | bddb0e7e3bb5c2666e9d883ecf84c260801ae46f /src/HttpResponseCommand.h | |
| parent | f7e3651d916f03c0a8d51dbd0e265bc5623979a3 (diff) | |
2008-07-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed broken gzip inflation.
Turn off segmented downloading if gzip content is smaller than
or equal
to 1MiB and inflate the data on the fly, because HTTP response
header
doesn't contain the length of inflated file we can't determin
where
the chunk of data should be written.
On the other hand, if gzip content is larger than 1MB, then turn
off
on the fly inflation, because some servers returns
"content-type: gzip"
for *.tgz, *.gz files.
* src/DownloadCommand.cc
* src/HttpResponseCommand.cc
* src/HttpResponseCommand.h
Diffstat (limited to 'src/HttpResponseCommand.h')
| -rw-r--r-- | src/HttpResponseCommand.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/HttpResponseCommand.h b/src/HttpResponseCommand.h index 0a30d08f..6cb410be 100644 --- a/src/HttpResponseCommand.h +++ b/src/HttpResponseCommand.h @@ -55,6 +55,10 @@ private: HttpDownloadCommand* createHttpDownloadCommand(const SharedHandle<HttpResponse>& httpResponse); protected: bool executeInternal(); + + bool shouldInflateContentEncoding + (const SharedHandle<HttpResponse>& httpResponse); + public: HttpResponseCommand(int32_t cuid, const SharedHandle<Request>& req, |
