[Zope] redirect strangeness ...

Oliver Bleutgen myzope@gmx.net
Tue, 27 Aug 2002 11:05:24 +0200


Dennis Allison wrote:
> It looks like the response code is "302" but it's a bit hard to tell given 
> the size complexity of the log data as the site is live...
> 
> Several folks have suggested that the URL passed to the redirect
> ought to be absolute and not relative.  Has this been your experience.
> (I looked and found no documentation one way or another--I've used 
> relative URLs in several places without problem.  On the other hand, 
> this is a problem.)


I told you already to look in the http rfc, but here's an excerpt:

14.30 Location

    The Location response-header field is used to redirect the recipient
    to a location other than the Request-URI for completion of the
    request or identification of a new resource. For 201 (Created)
    responses, the Location is that of the new resource which was created
    by the request. For 3xx responses, the location SHOULD indicate the
    server's preferred URI for automatic redirection to the resource. The
    field value consists of a single absolute URI.

        Location       = "Location" ":" absoluteURI

    An example is:

        Location: http://www.w3.org/pub/WWW/People.html

       Note: The Content-Location header field (section 14.14) differs
       from Location in that the Content-Location identifies the original
       location of the entity enclosed in the request. It is therefore
       possible for a response to contain header fields for both Location
       and Content-Location. Also see section 13.10 for cache
       requirements of some methods.


cheers,
oliver