Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

n1vux (1492)

  (email not shown publicly) ... x.cgi?BillRicker
AOL IM: n1vux (Add Buddy, Send Message)
Yahoo! ID: n1vux (Add User, Send Message)

Only started with Perl4 and Perl5 in 1995. I was doing AWK etc for 12 years before that, and resisted switching. I've been doing OO since before C++ hit bigtime, with Objective-C and SmallTalk, so I really like the (no longer new) Perl5 OO style; and the Lispish Map style is also an old friend. What do I hack with Perl? All data that passes my way; systems monitoring scripts at $DayJob, weather data at night, and I cheat on NPR word puzzles. Member: [] [] /. LinkedIn []

N1VUX is my FCC-issued ham radio callsign.

Journal of n1vux (1492)

Wednesday April 19, 2006
04:28 PM

LWP::Simple, HEAD method, Firewalls and http_proxy

[ #29378 ]
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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • 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. :(