in reply to LWP::UserAgent redirection troubles
$r->base Returns the base URI for this response. The return value will be a reference to a URI object. The base URI is obtained from one the following sources (in priority order): 1. Embedded in the document content, for instance <BASE HREF="..."> in HTML documents. 2. A "Content-Base:" or a "Content-Location:" header in the response. For backwards compatability with older HTTP imple- mentations we will also look for the "Base:" header. 3. The URI used to request this response. This might not be the original URI that was passed to $ua->request() method, because we might have received some redirect responses first. When the LWP protocol modules produce the HTTP::Response object, then any base URI embedded in the document (step 1) will already have initialized the "Content-Base:" header. This means that this method only performs the last 2 steps (the content is not always available either).
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: LWP::UserAgent redirection troubles
by tmbg (Novice) on May 02, 2001 at 20:03 UTC |