"Gisle Aas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> "Rob Dixon" <[EMAIL PROTECTED]> writes:
>
> > Could somebody tell me which URL should be used in
> > the Referer header when a link is followed from a
> > document which is the result of one or more redirections?
> > Is it the original document that was requested or the final
> > one which comes with a success status code?
>
> The way I interpret RFC 2616 it is the final one.
>
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.36
>
>   "The Referer[sic] request-header field allows the client to specify,
>   for the server's benefit, the address (URI) of the resource from
>   which the Request-URI was obtained."
>
> > Also, is there any part of LWP which will enter the correct
> > header value for me?
>
> Nothing adds it automatically, but there is a 'referer' method on the
> request object that you can call to set it.

Thanks Gisle: that makes sense. So in general, this will work:

    $request->referer($response->request->uri);

Rob



Reply via email to