Malformed host header due to scope-id in IPv6 link-local address

Malformed host header due to scope-id in IPv6 link-local address

am 09.02.2010 23:15:15 von Salman Haq

I have an Apache HTTP server (v 2.2.3) running on a Linux system serving
a simple web application. The server is configured to listen on port 80
on all configured interfaces. The system's ethernet interfaces have
properly configured IPv4 addresses and IPv6 link-local addresses.

I have a client program (written in Python using urllib2) which makes
GET requests to the server by specifying its IPv6 link-local address and
scope id. The server responds to this request with a HTTP 400 error and
logs "Client sent malformed Host header" in /var/logs/httpd/error_log.

Presumably, this is because of bug 35122
(https://issues.apache.org/bugzilla/show_bug.cgi?id=35122) where Apache
does not accept a Host header with the scope-id in the IPv6 address. So
the question, what should the correct host header be? My client program
can override the default header but I'm not sure it's as simple as that
because I tried changing the Host field to just the link-local address,
sans scope-id and Apache still thinks that the header is malformed.

In summary, neither of the following work:

Host: [fe80::207:b8ff:fedc:636b%eth0]
Host: [fe80::207:b8ff:fedc:636b]

N.B: fe80::207:b8ff:fedc:636b is the link-local address of an interface
on the server.

So the question is, for what value of the 'Host' header, will Apache
serve the request to a client like wget, curl, or my own python application?

Thank you,
Salman






------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org