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

[patch] Authenticating proxies & LWP

Thread Next
From:
John Klar
Date:
April 4, 2001 13:34
Subject:
[patch] Authenticating proxies & LWP
Message ID:
3ACB7D95.EAFFE73@xpedite.com
Hi,

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.

Usage:

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

John Klar

patch is against:
# $Id: UserAgent.pm,v 1.77 2001/03/14 20:48:19 gisle Exp $
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About