httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <>
Subject [PATCH] 2.1: UseCanonicalHostname Off results in erroneous Proxy Via header
Date Mon, 12 Jan 2004 12:37:06 GMT
Hello everyone,

If the configuration sets

 UseCanonicalHostname Off

and enables the proxy, then the Via: header will report not the proxy
hosts's ServerName (or any of its configured VHosts's names) as it
should, but the *origin hosts*'s name.

Example: if I go thru a local apache-2.1 proxy on port 8007 to, then the Via header (sent or returned) looks like

  Via: 1.0 (Apache/2.1.0-dev)

The reason is that the function ap_get_server_name() returns
r->hostname (which is the origin server's for proxy requests) if
UseCanonicalHostname is off

The attached patch checks for r->hostname equality (because the proxy
has no access to core.c's per_dir_config).

<>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

View raw message