aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorDai Sato <satodai@w3m.jp>2006-12-10 11:01:24 +0000
committerDai Sato <satodai@w3m.jp>2006-12-10 11:01:24 +0000
commitd067996dca64c847a799e9317cbee8aa92616772 (patch)
tree4f021d751b1ec22e35a9b13da21536bb443c4fad /file.c
parentaccept invalid "set-cookies" headers when "domainName == .hostName". (diff)
downloadw3m-d067996dca64c847a799e9317cbee8aa92616772.tar.gz
w3m-d067996dca64c847a799e9317cbee8aa92616772.zip
[w3m-dev 04184] automatic uncompression in downloading
Diffstat (limited to 'file.c')
-rw-r--r--file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/file.c b/file.c
index 883ee09..0946dc3 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.247 2006/12/10 10:49:23 inu Exp $ */
+/* $Id: file.c,v 1.248 2006/12/10 11:01:24 inu Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -2124,7 +2124,8 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
return NO_BUFFER;
}
- if ((f.content_encoding != CMP_NOCOMPRESS) && !(w3m_dump & DUMP_EXTRA)) {
+ if ((f.content_encoding != CMP_NOCOMPRESS) && AutoUncompress
+ && !(w3m_dump & DUMP_EXTRA)) {
uncompress_stream(&f, &pu.real_file);
}
else if (f.compression != CMP_NOCOMPRESS) {
@@ -7861,7 +7862,7 @@ doFileSave(URLFile uf, char *defstr)
flush_tty();
pid = fork();
if (!pid) {
- if (uf.content_encoding != CMP_NOCOMPRESS) {
+ if ((uf.content_encoding != CMP_NOCOMPRESS) && AutoUncompress) {
uncompress_stream(&uf, &tmpf);
if (tmpf)
unlink(tmpf);
@@ -7898,7 +7899,7 @@ doFileSave(URLFile uf, char *defstr)
printf("Can't save. Load file and %s are identical.", p);
return -1;
}
- if (uf.content_encoding != CMP_NOCOMPRESS) {
+ if (uf.content_encoding != CMP_NOCOMPRESS && AutoUncompress) {
uncompress_stream(&uf, &tmpf);
if (tmpf)
unlink(tmpf);