httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy T. Fielding <>
Subject Re: Problem with redirections
Date Sat, 19 Feb 2005 02:50:54 GMT
On Feb 18, 2005, at 4:51 PM, Arne Thomassen wrote:

> sometimes there seems to be a problem with the interoperation of the 
> web
> browser retawq (<>) and the Apache httpd 
> -
> the httpd sends a redirection response pointing back to the original
> request URI, which would cause an infinite loop of redirections.

I just tried it with telnet and can confirm the redirects, though
note that the redirect does not happen if you exclude the :80 or
:443 port information from Host.

It would appear that those sites have been configured to
canonicalize the URI used for access, and thus are directing
your client not to include the port info in Host. RFC 2616
section 14.23 Host:

    The Host request-header field specifies the Internet host and port
    number of the resource being requested, as obtained from the original
    URI given by the user or referring resource (generally an HTTP URL,
    as described in section 3.2.2). The Host field value MUST represent
    the naming authority of the origin server or gateway given by the
    original URL.

Thus, your client is not HTTP-compliant.  Also, you should be
sending HTTP/1.1 requests, not HTTP/1.0.

> So there are two questions: Can/will you solve the problem inside httpd
> somehow?


> And how could I change the request header to avoid the problem
> with existing httpd versions?

Yes, don't add the port to Host unless it was present in the URI.


Roy T. Fielding                            <>
Chief Scientist, Day Software              <>

View raw message