Documentation of the "base" method of the "response" object says:
>>>
The base URL 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 implementations we will also
look for the ``Base:'' header.
3.The URL used to request this response. This might not be the original URL
that was passed to $ua->request() method, because we might have received
some redirect responses first.
>>>
I assume that the purpose of the "base" method is to return a URL which you
use as a base when parsing relative URL's and computing the actual absolute
URL that they point to.
So, it makes sense to parse the <BASE HREF=``...''> value, but why would
you parse the value of the "Content-Location:" header? From what I can
see, this has no effect on the "base" URL as determined by a standard
browser. e.g.
http://peacefire.org/holder/dir1/headers.cgi
gets served with the headers:
Content-Location: http://www.yahoo.com/
Content-type: text/html
but Netscape 4.75 and IE 5.5 both interpret the relative link on that page:
<a href="test.html">click</a>
to point to http://peacefire.org/holder/dir1/test.html . If both major
browsers ignore the Content-Location: header, shouldn't HTTP::Response
ignore it as well?
-Bennett
[EMAIL PROTECTED] http://www.peacefire.org
(425) 649 9024
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users