LWP::Simple, HEAD method, Firewalls and http_proxy

n1vux on 2006-04-19T21:28:08

I decided I needed to try setting up CPAN::Mini at work. Not a problem, only missing File::HomeDir and Compress::Zlib on my development system which I should have anyway.

But the minicpan script failed with message

unable to contact the remote mirror

After verifying that it was attempting to use the $ENV{http_proxy} standard (by adding debug lines to the CPAN::Mini module), I guessed that I needed to comment out the lines in CPAN::Mini::new():

  # croak "unable to contact the remote mirror"
  #  unless LWP::Simple::head($self->{remote});
since HEAD isn't always as well supported or tested ... and voila, it works. Apparently LWP::Simple doesn't use UserAgent's env_proxy options for HEAD method.



I already have a bug report submitted at rt.cpan ... I'm recording the workaround here so folks googling for a solution have a chance to find the work-around.


Ouch,,,

Alias on 2006-04-20T01:09:53

You can blame me for that line of code.

I guess it never occured to me that something as stable and mature as LWP wouldn't Just Work with normal features. :(