Re: proxy authentication and little patch

Le mardi 28 mars 2006 =E0 23:28, Bas Bloemsaat =E9crivait:
> Hi,
>
> Tonight I was stumbling over authentication, trying to get through a pr=
oxy
> with LWP::UserAgent.

Did you try using http://user:pass [at] proxy:port/ for the proxy address?

Compare

$ HTTP_PROXY=3Dhttp://localhost:8080/ perl -MLWP -MLWP::Debug=3D+ -e=
'print LWP::UserAgent->new(env_proxy =3D> 1)->request( HTTP::Request->ne=
w( GET =3D> "http://www.perdu.com/"))->content()'
LWP::UserAgent::new: ()
LWP::UserAgent::proxy: http http://localhost:8080/
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://www.perdu.com/
LWP::UserAgent::_need_proxy: Proxied to http://localhost:8080/
LWP::Protocol::http::request: ()
LWP::UserAgent::request: Simple response: Proxy Authentication Requir=
ed

with

$ HTTP_PROXY=3Dhttp://http:proxy [at] localhost:8080/ perl -MLWP -MLWP::De=
bug=3D+ -e 'print LWP::UserAgent->new(env_proxy =3D> 1)->request( HTTP::=
Request->new( GET =3D> "http://www.perdu.com/"))->content()'
LWP::UserAgent::new: ()
LWP::UserAgent::proxy: http http://http:proxy [at] localhost:8080/
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://www.perdu.com/
LWP::UserAgent::_need_proxy: Proxied to http://http:proxy [at] localhost:8=
080/
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 204 bytes
LWP::UserAgent::request: Simple response: OK
<html><head><title>Vous Etes Perdu ?</title></head><body><h1>Perdu su=
r l'Internet ?</h1><h2>Pas de panique, on va vous aider</h2><strong><pre>=
* <----- vous êtes ici</pre></strong></body></html>

--
Philippe "BooK" Bruhat

Remember that what is good for the goose may not be good for the gender.
(Moral from Groo The Wanderer #4 (Ep=
ic))
philippe.bruhat [ Do, 30 März 2006 11:34 ] [ ID #1253789 ]
Perl » perl.libwww » Re: proxy authentication and little patch

Vorheriges Thema: 501 return code
Nächstes Thema: Re: Subject: [Crypt::SSLeay] test problems on Solaris 2.8