diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-13 15:47:12 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-13 15:47:12 +0000 |
commit | f15e6e885cce5bde49e862623a51830bbfebad35 (patch) | |
tree | c344966691378a4435887b3b171edfef78d496c8 | |
parent | [w3m-dev 03422] Re: setting form on loading (diff) | |
download | w3m-f15e6e885cce5bde49e862623a51830bbfebad35.tar.gz w3m-f15e6e885cce5bde49e862623a51830bbfebad35.zip |
[w3m-dev 03424] Content length
* file.c (loadGeneralFile): current_content_length before do_download
(save2tmp): current_content_length move before return
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | file.c | 12 |
2 files changed, 13 insertions, 7 deletions
@@ -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 $ @@ -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; } |