You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2002/08/23 16:01:09 UTC

DO NOT REPLY [Bug 11971] New: - HTTP proxy header "Via" with wrong hostname if ServerName not set or UseCanonicalName Off

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11971>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11971

HTTP proxy header "Via" with wrong hostname if ServerName not set or UseCanonicalName Off

           Summary: HTTP proxy header "Via" with wrong hostname if
                    ServerName not set or UseCanonicalName Off
           Product: Apache httpd-2.0
           Version: 2.0.40
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: apache-bugzilla@deuxchevaux.org


Summary:

When using mod_proxy without a ServerName directive (as in the default config)
or UseCanonicalName Off, the Via-Header of HTTP/1.1 proxy responses show either
the hostname of the requested ressource or the hostname of the requested
ressource plus the port of the proxy, but not the hostname of the proxy itself.

Short examples:

Without ServerName set (equal if UseCanonicalName on or off), the request "GET
http://noone.org/ HTTP/1.1" results incorrectly in "Via: 1.1 noone.org
(Apache/2.0.40)" and "GET http://www.apache.org/ HTTP/1.1" results incorrectly
in "Via: 1.1 www.apache.org (Apache/2.0.40)".

With ServerName set to abe.i.ecos.de:8002 and "UseCanoncialName Off", "GET
http://noone.org/ HTTP/1.1" results incorrectly but differently in "Via: 1.1
noone.org:8002 (Apache/2.0.40)"

With ServerName set to abe.i.ecos.de:8002 and "UseCanoncialName On", "GET
http://noone.org/ HTTP/1.1" results correctly in "Via: 1.1 abe.i.ecos.de:8002
(Apache/2.0.40)"

Long and detailed examples (response bodies suppressed):

Without ServerName:

GET http://noone.org/ HTTP/1.1
Host: noone.org
Connection: Close

HTTP/1.1 200 OK
Date: Fri, 23 Aug 2002 13:36:14 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6e
Last-Modified: Wed, 17 Apr 2002 08:48:05 GMT
ETag: "1bc0e0-5b8-3cbd36c5"
Accept-Ranges: bytes
Content-Type: text/html; charset=ISO-8859-1
Via: 1.1 noone.org (Apache/2.0.40)
Content-Length: 1464
Connection: close

or

GET http://www.apache.org/ HTTP/1.1
Host: www.apache.org
Connection: close

HTTP/1.1 200 OK
Date: Fri, 23 Aug 2002 13:35:46 GMT
Server: Apache/2.0.40 (Unix)
Cache-Control: max-age=86400
Expires: Sat, 24 Aug 2002 13:35:45 GMT
Accept-Ranges: bytes
Content-Type: text/html; charset=ISO-8859-1
Via: 1.1 www.apache.org (Apache/2.0.40)
Content-Length: 7751
Connection: close

With ServerName set to abe.i.ecos.de:8002 and UseCanonicalName On:

GET http://noone.org/ HTTP/1.1
Host: noone.org
Connection: Close

HTTP/1.1 200 OK
Date: Fri, 23 Aug 2002 13:37:54 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6e
Last-Modified: Wed, 17 Apr 2002 08:48:05 GMT
ETag: "1bc0e0-5b8-3cbd36c5"
Accept-Ranges: bytes
Content-Type: text/html; charset=ISO-8859-1
Via: 1.1 abe.i.ecos.de:8002 (Apache/2.0.40)
Content-Length: 1464
Connection: close

If I switch off UseCanonicalName, it's wrong again, but differently.
I set the following in httpd.conf:

ServerName abe.i.ecos.de:8002
UseCanonicalName Off

Then the following happens:

GET http://noone.org/ HTTP/1.1
Host: noone.org
Connection: Close

HTTP/1.1 200 OK
Date: Fri, 23 Aug 2002 13:44:38 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6e
Last-Modified: Wed, 17 Apr 2002 08:48:05 GMT
ETag: "1bc0e0-5b8-3cbd36c5"
Accept-Ranges: bytes
Content-Type: text/html; charset=ISO-8859-1
Via: 1.1 noone.org:8002 (Apache/2.0.40)
Content-Length: 1464
Connection: close

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org