mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 464162 - Apache does not accept IPv6 addresses with a scope id in the Host: header; r+sr=cbiesinger
This commit is contained in:
parent
4ef89e9db6
commit
2623c93663
@ -222,7 +222,14 @@ nsHttpChannel::Init(nsIURI *uri,
|
||||
if (strchr(host.get(), ':')) {
|
||||
// host is an IPv6 address literal and must be encapsulated in []'s
|
||||
hostLine.Assign('[');
|
||||
hostLine.Append(host);
|
||||
// scope id is not needed for Host header.
|
||||
int scopeIdPos = host.FindChar('%');
|
||||
if (scopeIdPos == kNotFound)
|
||||
hostLine.Append(host);
|
||||
else if (scopeIdPos > 0)
|
||||
hostLine.Append(Substring(host, 0, scopeIdPos));
|
||||
else
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
hostLine.Append(']');
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user