diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-30 10:49:06 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-30 10:49:06 +0000 |
commit | c0e95adf50fa07ff14e07feea2f43816826c42f3 (patch) | |
tree | 936d1c3511db4517387c0fd9b6256e32688cf95d | |
parent | [w3m-dev 02596] (diff) | |
download | w3m-c0e95adf50fa07ff14e07feea2f43816826c42f3.tar.gz w3m-c0e95adf50fa07ff14e07feea2f43816826c42f3.zip |
[w3m-dev 02597]
From: Fumitoshi UKAI <ukai@debian.or.jp>
-rw-r--r-- | ChangeLog | 16 | ||||
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | fm.h | 4 | ||||
-rw-r--r-- | rc.c | 14 | ||||
-rw-r--r-- | url.c | 11 |
5 files changed, 37 insertions, 12 deletions
@@ -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] @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: configure,v 1.28 2001/11/30 09:54:22 ukai Exp $ +# $Id: configure,v 1.29 2001/11/30 10:49:06 ukai Exp $ # Configuration. # @@ -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=//'` @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.24 2001/11/30 09:54:22 ukai Exp $ */ +/* $Id: fm.h,v 1.25 2001/11/30 10:49:06 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -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); @@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.18 2001/11/30 09:54:22 ukai Exp $ */ +/* $Id: rc.c,v 1.19 2001/11/30 10:49:06 ukai Exp $ */ /* * Initialization file etc. */ @@ -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 @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.13 2001/11/30 09:54:22 ukai Exp $ */ +/* $Id: url.c,v 1.14 2001/11/30 10:49:06 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include <sys/socket.h> @@ -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') { |