w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 809ff9e50a48b2b2311ee2dcd8ce9861dba7f722
parent da78544d9c574d7d65c3755bb3cf7177621c5efd
Author: ukai <ukai>
Date:   Wed, 13 Nov 2002 15:47:12 +0000

[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>

Diffstat:
MChangeLog | 6++++++
Mfile.c | 10+++++-----
2 files changed, 11 insertions(+), 5 deletions(-)

diff --git 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 diff --git a/file.c b/file.c @@ -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; }