Re: NULL paths in requests

sön 2009-07-05 klockan 12:07 +1200 skrev Adrien de Croy:

> turns out this was coming out the other side of a proxy, and what was 
> going in was a absolute-URI missing a final '/'
> 
> In which case I think a proxy is allowed to add it back in.

Which is exactly what the paragraph you quoted earlier says. If read in
context with the paragraph above which it refers to it becomes clearer:

The conditions you have to fulfill here are as follows (from p1 5.1.2
request-target), skipping comments and example text:

        The most common form of request-target is that used to identify
        a resource on an origin server or gateway. In this case the
        absolute path of the URI MUST be transmitted (see Section 2.1.1,
        path-absolute) as the request-target, and the network location
        of the URI (authority) MUST be transmitted in a Host header
        field.
        
        Note that the absolute path cannot be empty; if none is present
        in the original URI, it MUST be given as "/" (the server root).
        
        If a proxy receives a request without any path in the
        request-target and the method specified is capable of supporting
        the asterisk form of request-target, then the last proxy on the
        request chain MUST forward the request with "*" as the final
        request-target.
        
        A transparent proxy MUST NOT rewrite the "path-absolute" part of
        the received request-target when forwarding it to the next
        inbound server, except as noted above to replace a null
        path-absolute with "/".

Which highlights a minor editorial issue.. the 'MUST be given as "/"'
perhaps should mention "*" as well to avoid conflict with that MUST
requirement. But there isn't much room for doubt if one actually reads
the whole 5.1.2 section..

Note for those who look at the text found in 2616: The "*" MUST
requirement was in 2068, but somehow got lost in 2616, and is now
resurrected in HTTPbis.

Regards
Henrik

Received on Tuesday, 7 July 2009 20:12:23 UTC