aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-12-06 16:35:37 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-12-06 16:35:37 +0000
commit10e43e224863a92eeb34a24b82a4ec91d49378de (patch)
treed62a343c01d4ca961a19174e2b083413b15cbc98
parent[w3m-dev 02629] (diff)
downloadw3m-10e43e224863a92eeb34a24b82a4ec91d49378de.tar.gz
w3m-10e43e224863a92eeb34a24b82a4ec91d49378de.zip
[#489463] Host: header is wrong IPv6 literal addr
-rw-r--r--ChangeLog5
-rw-r--r--url.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 90c8b6e..c3c9122 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-07 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * [#489463] Host: header is wrong IPv6 literal addr
+ * url.c (otherinfo): IPv6 address should be quoted with bracket
+
2001-12-07 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02629]
diff --git a/url.c b/url.c
index bc0381b..3f5c322 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.19 2001/12/06 15:44:41 ukai Exp $ */
+/* $Id: url.c,v 1.20 2001/12/06 16:35:37 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -1204,7 +1204,12 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
if (target->host) {
Strcat_charp(s, "Host: ");
- Strcat_charp(s, target->host);
+#ifdef INET6
+ if (strchr(target->host, ':') != NULL)
+ Strcat(s, Sprintf("[%s]", target->host));
+ else
+#endif
+ Strcat_charp(s, target->host);
if (target->port != DefaultPort[target->scheme])
Strcat(s, Sprintf(":%d", target->port));
Strcat_charp(s, "\r\n");