Rob Dixon wrote:
> 
> Hi
> 
> 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? Also, is there
> any part of LWP which will enter the correct header value
> for me?

referer should be the step-before-last
from past lwp list thread of Thu, 14 Mar 2002
> TIP#4
> Sometimes you -need- to pass HTTP_REFERER data, e.g.:
>   $request->referer('http://www.example.com/logon.html');
> 
> TIP#5
> # use as needed to show/debug header info
> use LWP::Debug qw(+);
> 
> TIP#6
> Sometimes you need to follow redirects:
> # use as needed to allow LWP to follow redirects
> BEGIN { *LWP::UserAgent::redirect_ok = sub { 1 } }

Reply via email to