Le mardi 28 mars 2006 à 23:28, Bas Bloemsaat écrivait:
> Hi,
> 
> Tonight I was stumbling over authentication, trying to get through a proxy
> with LWP::UserAgent.

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

Compare

    $ HTTP_PROXY=http://localhost:8080/ perl -MLWP -MLWP::Debug=+  -e 'print 
LWP::UserAgent->new(env_proxy => 1)->request( HTTP::Request->new( GET => 
"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 Required

with

    $ HTTP_PROXY=http://http:[EMAIL PROTECTED]:8080/ perl -MLWP -MLWP::Debug=+  
-e 'print LWP::UserAgent->new(env_proxy => 1)->request( HTTP::Request->new( GET 
=> "http://www.perdu.com/";))->content()'
    LWP::UserAgent::new: ()
    LWP::UserAgent::proxy: http http://http:[EMAIL PROTECTED]:8080/
    LWP::UserAgent::request: ()
    LWP::UserAgent::send_request: GET http://www.perdu.com/
    LWP::UserAgent::_need_proxy: Proxied to http://http:[EMAIL PROTECTED]:8080/
    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 sur 
l'Internet ?</h1><h2>Pas de panique, on va vous aider</h2><strong><pre>    * 
<----- vous &ecirc;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 (Epic))

Reply via email to