w3m

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

commit 129a31970d78c13a7e4209ff5470e70a5d9297c2
parent dabeef5697e12914592787b79505c4256eac3bcb
Author: ukai <ukai>
Date:   Fri, 30 Nov 2001 10:49:06 +0000

[w3m-dev 02597]
From: Fumitoshi UKAI <ukai@debian.or.jp>

Diffstat:
MChangeLog | 16++++++++++++++++
Mconfigure | 2+-
Mfm.h | 2++
Mrc.c | 12++++++++++++
Murl.c | 9++-------
5 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,19 @@ +2001-11-30 Fumitoshi UKAI <ukai@debian.or.jp> + + * [w3m-dev 02597] (based on [w3m-dev 02594] by aito@fw.ipsj.or.jp) + * fm.h (AcceptLang): added + * fm.h (AcceptMedia): added + * rc.c (CMT_ACCEPTENCODING): added + * rc.c (CMT_ACCEPTMEDIA): added + * rc.c (params9): add accept_encoding, accept_media + * rc.c (sync_with_option): initialize AcceptEncoding and AcceptMedia + * url.c (otherinfo): use Strcat_m_charp() + +2001-11-30 aito@fw.ipsj.or.jp + + * [w3m-dev 02594] + * configure: s/dcode/display_code/ + 2001-11-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> * [w3m-dev 02596] diff --git a/configure b/configure @@ -92,7 +92,7 @@ do dmodel=6 ;; -code=*|--code=*) - dcode=`expr "$1" : "-*code=\(.*\)"` + display_code=`expr "$1" : "-*code=\(.*\)"` ;; -cflags=*|--cflags=*) dcflags=`echo $1 | sed -e 's/-*cflags=//'` diff --git a/fm.h b/fm.h @@ -736,6 +736,8 @@ global int do_download init(FALSE); global char *UserAgent init(NULL); global int NoSendReferer init(FALSE); global char *AcceptLang init(NULL); +global char *AcceptEncoding init(NULL); +global char *AcceptMedia init(NULL); global int WrapDefault init(FALSE); global int IgnoreCase init(TRUE); global int WrapSearch init(FALSE); diff --git a/rc.c b/rc.c @@ -118,6 +118,8 @@ static char *config_file = NULL; #define CMT_FTPPASS_HOSTNAMEGEN "FTPのパスワードのドメイン名を自動生成する" #endif #define CMT_USERAGENT "User-Agent" +#define CMT_ACCEPTENCODING "圧縮方法(Accept-Encoding:)" +#define CMT_ACCEPTMEDIA "受けつけるメディアタイプ(Accept:)" #define CMT_ACCEPTLANG "受けつける言語(Accept-Language:)" #define CMT_DOCUMENTCODE "文書の文字コード" #define CMT_SYSTEMCODE "システムの文字コード" @@ -231,6 +233,8 @@ static char *config_file = NULL; #define CMT_FTPPASS_HOSTNAMEGEN "generate domain part of password for FTP" #endif #define CMT_USERAGENT "User-Agent" +#define CMT_ACCEPTENCODING "Accept-Encoding" +#define CMT_ACCEPTMEDIA "Accept" #define CMT_ACCEPTLANG "Accept-Language" /* #define CMT_DOCUMENTCODE "Document Charset" */ /* #define CMT_SYSTEMCODE "System Kanji Code" */ @@ -547,6 +551,10 @@ struct param_ptr params9[] = { NULL}, {"accept_language", P_STRING, PI_TEXT, (void *)&AcceptLang, CMT_ACCEPTLANG, NULL}, + {"accept_encoding", P_STRING, PI_TEXT, (void *)&AcceptEncoding, CMT_ACCEPTENCODING, + NULL}, + {"accept_media", P_STRING, PI_TEXT, (void *)&AcceptMedia, CMT_ACCEPTMEDIA, + NULL}, {"argv_is_url", P_CHARINT, PI_ONOFF, (void *)&ArgvIsURL, CMT_ARGV_IS_URL, NULL}, {"retry_http", P_INT, PI_ONOFF, (void *)&retryAsHttp, CMT_RETRY_HTTP, @@ -1082,6 +1090,10 @@ sync_with_option(void) #endif initMailcap(); initMimeTypes(); + if (AcceptEncoding == NULL || *AcceptEncoding == '\0') + AcceptEncoding = acceptableEncoding(); + if (AcceptMedia == NULL || *AcceptMedia == '\0') + AcceptMedia = acceptableMimeTypes(); } void diff --git a/url.c b/url.c @@ -1198,13 +1198,8 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer) Strcat_charp(s, UserAgent); Strcat_charp(s, "\r\n"); - Strcat_charp(s, "Accept: "); - Strcat_charp(s, acceptableMimeTypes()); - Strcat_charp(s, "\r\n"); - - Strcat_charp(s, "Accept-Encoding: "); - Strcat_charp(s, acceptableEncoding()); - Strcat_charp(s, "\r\n"); + Strcat_m_charp(s, "Accept: ", AcceptMedia, "\r\n"); + Strcat_m_charp(s, "Accept-Encoding: ", AcceptEncoding, "\r\n"); Strcat_charp(s, "Accept-Language: "); if (AcceptLang != NULL && *AcceptLang != '\0') {