[#489463] Host: header is wrong IPv6 literal addr
This commit is contained in:
@@ -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>
|
2001-12-07 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
|
||||||
|
|
||||||
* [w3m-dev 02629]
|
* [w3m-dev 02629]
|
||||||
|
7
url.c
7
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 "fm.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@@ -1204,6 +1204,11 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
|
|||||||
|
|
||||||
if (target->host) {
|
if (target->host) {
|
||||||
Strcat_charp(s, "Host: ");
|
Strcat_charp(s, "Host: ");
|
||||||
|
#ifdef INET6
|
||||||
|
if (strchr(target->host, ':') != NULL)
|
||||||
|
Strcat(s, Sprintf("[%s]", target->host));
|
||||||
|
else
|
||||||
|
#endif
|
||||||
Strcat_charp(s, target->host);
|
Strcat_charp(s, target->host);
|
||||||
if (target->port != DefaultPort[target->scheme])
|
if (target->port != DefaultPort[target->scheme])
|
||||||
Strcat(s, Sprintf(":%d", target->port));
|
Strcat(s, Sprintf(":%d", target->port));
|
||||||
|
Reference in New Issue
Block a user