Inconsistent $response->base behaviour
Hans de Graaff (J.J.deGraaff@twi.tudelft.nl)
16 Jul 1996 10:07:17 +0200
I just found out that the base() method in HTTP::Response usually
returns a URI::URL object, but sometimes just plain text.
Since I was doing something like $response->base->netloc in my
Checkbot program, this failed whenever I got text back. Now, it only
gives text when an explicit Base: header has been found, which doesn't
happen that often.
I could fix this in Checkbot by always making a new URL before trying
to get the netloc, but I'd rather see this changed in LWP. It is more
consistent if the base() method always returns a URI::URL object, and
it will also be more efficient (because a new URI::URL object is only
created when needed).
Comments?
Hans
--
Hans de Graaff http://is.twi.tudelft.nl/~graaff/