summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-09-13 13:31:09 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-09-13 13:31:09 +0000
commit1906832f4363b7002e2e55219399ee4ef142a82e (patch)
tree8fbb3ec1943ab22b8a8e103b1b6ffa03ae5bfbd5 /src/HttpResponseCommand.cc
parent6b6e6bc4956dfe9c97bfa204eafa932a056d9ea9 (diff)
2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without zlib * src/HttpResponseCommand.cc
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index 32404ba1..32fb6dbb 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -72,8 +72,10 @@
#include "StreamFilter.h"
#include "SinkStreamFilter.h"
#include "ChunkedDecodingStreamFilter.h"
-#include "GZipDecodingStreamFilter.h"
#include "uri.h"
+#ifdef HAVE_LIBZ
+# include "GZipDecodingStreamFilter.h"
+#endif // HAVE_LIBZ
namespace aria2 {
@@ -459,6 +461,7 @@ bool HttpResponseCommand::skipResponseBody
static bool decideFileAllocation
(const SharedHandle<StreamFilter>& filter)
{
+#ifdef HAVE_LIBZ
for(SharedHandle<StreamFilter> f = filter; !f.isNull(); f = f->getDelegate()){
// Since the compressed file's length are returned in the response header
// and the decompressed file size is unknown at this point, disable file
@@ -467,6 +470,7 @@ static bool decideFileAllocation
return false;
}
}
+#endif // HAVE_LIBZ
return true;
}