Subject: | UserAgent should not cache HEAD requests |
here's an example. it would be nice if this UA did not cache HEAD requests, because they have no content, and if you call a GET request on the same URI, it contains no content.
use LWP::UserAgent::WithCache;
use HTTP::Request::Common qw/GET HEAD/;
my $ua = LWP::UserAgent::WithCache;
$ua->request(HEAD "http://perl.org");
my $res = $ua->request(GET "http://perl.org");
die "no content" unless $res->content;