aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--file.c12
2 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 44630e5..26565e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-11-14 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03424] Content length
+ * file.c (loadGeneralFile): current_content_length before do_download
+ (save2tmp): current_content_length move before return
+
2002-11-12 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev 03422] Re: setting form on loading
@@ -4595,4 +4601,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.506 2002/11/12 13:06:14 ukai Exp $
+$Id: ChangeLog,v 1.507 2002/11/13 15:47:12 ukai Exp $
diff --git a/file.c b/file.c
index fbf9f1c..ad345ff 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.114 2002/11/09 21:55:24 ukai Exp $ */
+/* $Id: file.c,v 1.115 2002/11/13 15:47:12 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -1856,6 +1856,10 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
copyParsedURL(cur_baseURL, &pu);
#endif
+ current_content_length = 0;
+ if ((p = checkHeader(t_buf, "Content-Length:")) != NULL)
+ current_content_length = strtoclen(p);
+
if (do_download) {
/* download only */
char *file;
@@ -1954,10 +1958,6 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
}
}
- current_content_length = 0;
- if ((p = checkHeader(t_buf, "Content-Length:")) != NULL)
- current_content_length = strtoclen(p);
-
if (flag & RG_FRAME) {
t_buf = newBuffer(INIT_BUFFER_WIDTH);
t_buf->bufferprop |= BP_FRAME;
@@ -7008,7 +7008,6 @@ save2tmp(URLFile uf, char *tmpf)
if (fmInitialized)
term_cbreak();
check = 0;
- current_content_length = 0;
#ifdef USE_NNTP
if (uf.scheme == SCM_NEWS) {
char c;
@@ -7048,6 +7047,7 @@ save2tmp(URLFile uf, char *tmpf)
fclose(ff);
if (uf.scheme == SCM_FTP)
FTPhalfclose(uf.stream);
+ current_content_length = 0;
return 0;
}