On Sat, 11 Mar 2000, David Dyck wrote:
> head($url)
> Get document headers. Returns the following 5 values if
> successful: ($content_type, $document_length, $modi-
> fied_time, $expires, $server)
>
> Returns an empty list if it fails. In scalar context
> returns TRUE if successful.
> Changing line 14 to read
> HTTP::Date::str2time($response->header('Expires')) || undef,
> or
> scalar( HTTP::Date::str2time($response->header('Expires')) ),
>
> reserves the slot, so that the server header in returned
> in the 5'th position.
This patch fixes the problem for perl v5.6.0-RC1
--- /jd/usr2/dcd/CPAN/Installed/libwww-perl-5.47/lib/LWP/Simple.pm Fri Mar 19
23:37:36 1999
+++ LWP/Simple.pm Sat Mar 11 14:20:37 2000
@@ -220,8 +220,8 @@
return $response unless wantarray;
return (scalar $response->header('Content-Type'),
scalar $response->header('Content-Length'),
- HTTP::Date::str2time($response->header('Last-Modified')),
- HTTP::Date::str2time($response->header('Expires')),
+ scalar( HTTP::Date::str2time($response->header('Last-Modified')) ),
+ scalar( HTTP::Date::str2time($response->header('Expires')) ),
scalar $response->header('Server'),
);
}