commit 7e4e01c491c011e470dac3858861eaf0a8877517
parent 7a400dab803f0309a0a00a751dd0d86dc0447a11
Author: ukai <ukai>
Date: Thu, 6 Dec 2001 16:35:37 +0000
[#489463] Host: header is wrong IPv6 literal addr
Diffstat:
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git 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
@@ -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");