aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-11-30 14:06:27 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-11-30 14:06:27 +0000
commitecf09ea77a2a657ccd2116557d9963fb54f1657c (patch)
treeb6591de1f256ae670ceef11bb23017fba5ce3503
parentrun make indent (diff)
downloadw3m-ecf09ea77a2a657ccd2116557d9963fb54f1657c.tar.gz
w3m-ecf09ea77a2a657ccd2116557d9963fb54f1657c.zip
modify AcceptLang
-rw-r--r--ChangeLog5
-rw-r--r--rc.c10
-rw-r--r--url.c15
3 files changed, 16 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 71706fd..746b59e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-30 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * url.c (otherinfo): use AcceptLang
+ * rc.c (sync_with_option): initialize AcceptLang
+
2001-11-30 Tsutomu Okada <okada@furuno.co.jp>
* [w3m-dev 02599]
diff --git a/rc.c b/rc.c
index 9194053..881b9e4 100644
--- a/rc.c
+++ b/rc.c
@@ -1,4 +1,4 @@
-/* $Id: rc.c,v 1.20 2001/11/30 11:11:44 ukai Exp $ */
+/* $Id: rc.c,v 1.21 2001/11/30 14:06:27 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -1091,6 +1091,14 @@ sync_with_option(void)
#endif
initMailcap();
initMimeTypes();
+
+ if (AcceptLang == NULL || *AcceptLang == '\0') {
+#if LANG == JA
+ AcceptLang = "ja; q=1.0, en; q=0.5";
+#else /* LANG != JA (must be EN) */
+ AcceptLang = "en; q=1.0";
+#endif
+ }
if (AcceptEncoding == NULL || *AcceptEncoding == '\0')
AcceptEncoding = acceptableEncoding();
if (AcceptMedia == NULL || *AcceptMedia == '\0')
diff --git a/url.c b/url.c
index 5818c7d..147cbeb 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.15 2001/11/30 11:06:25 ukai Exp $ */
+/* $Id: url.c,v 1.16 2001/11/30 14:06:27 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -1200,19 +1200,8 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
Strcat_m_charp(s, "Accept: ", AcceptMedia, "\r\n", NULL);
Strcat_m_charp(s, "Accept-Encoding: ", AcceptEncoding, "\r\n", NULL);
+ Strcat_m_charp(s, "Accept-Language: ", AcceptLang, "\r\n", NULL);
- Strcat_charp(s, "Accept-Language: ");
- if (AcceptLang != NULL && *AcceptLang != '\0') {
- Strcat_charp(s, AcceptLang);
- Strcat_charp(s, "\r\n");
- }
- else {
-#if LANG == JA
- Strcat_charp(s, "ja; q=1.0, en; q=0.5\r\n");
-#else /* LANG != JA (must be EN) */
- Strcat_charp(s, "en; q=1.0\r\n");
-#endif /* LANG != JA */
- }
if (target->host) {
Strcat_charp(s, "Host: ");
Strcat_charp(s, target->host);