LWP problems with authenticating proxy

D

Dan Rawson

We have a proxy server which requires a user name and password. I'm
attempting to use LWP::Simple to get some web pages from external hosts with
no luck . . . .

I can get the proxy to work correctly with an external tool like wget, which
has proxy_user and proxy_password command-line options.

Using LWP::Simple always produces the error message:

501 Protocol scheme '' is not supported

I've looked through the LWP documentation, but I don't see how to set the
proxy user/password :-((

Thanks!

Dan
 
T

Tad McClellan

Dan Rawson said:
We have a proxy server which requires a user name and password. I'm
attempting to use LWP::Simple


What you are trying to do goes beyond "simple", so you will need
to use a more full-featured module instead.

I've looked through the LWP documentation, but I don't see how to set the
proxy user/password :-((


Search for "credentials" in

perldoc LWP::UserAgent
 
P

Paul Lalli

What you are trying to do goes beyond "simple", so you will need
to use a more full-featured module instead.

No he won't. LWP::Simple initializes its underlying User Agent by
calling $ua->env_proxy(). LWP::UserAgent's documentation shows that
the env_proxy() method looks for the $http_proxy environment variable.

Just set http_proxy before loading up LWP::Simple, and you'll be fine.

Paul Lalli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,732
Latest member
ArronPalin

Latest Threads

Top