develooper Front page | perl.libwww | Postings from April 2001

[patch] Authenticating proxies & LWP

Thread Next
John Klar
April 4, 2001 13:34
[patch] Authenticating proxies & LWP
Message ID:

I've been playing around with LWP::Simple over the past week
to snarf historical stock quotes from Yahoo for tax reporting.

Pleased with my feeble effort I wanted to share it with my
co-workers who may also need it and discovered the joys of
LWP and authenticating proxies.

Yes, doable but quite messy.  A colleage lamented the fact that
LWP::Simple (he's into one-liners) is not usable with auth proxies.  

Therefore, having a few free cycles, I taught UserAgent how to 
deal with this.  My version extracts the userinfo() portion of
the proxy URI.

I hope you find this patch useful.  I am by no means a Perl hacker, 
so feel free to modify to taste.


# export http_proxy="http://proxyuser:proxypass@proxyhost.proxynet:port"

John Klar

patch is against:
# $Id:,v 1.77 2001/03/14 20:48:19 gisle Exp $
Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About