Re: HTTP proxy authentication

Prateek <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
$ua->proxy()
is not accepting username and password as parameters.

I am having activestate perl on win32.
$ua->env_proxy()
is not helping. The environment variables are correctly set.

I worked around this by using
    my $req = HTTP::Request->new(GET => $url);
    $req->proxy_authorization_basic('username', 'password');
    $mech->request( $req);
and this worked fine.

Now, This works well for HTTP but not for HTTPS.
I am having Crypt::SSLeay
But this approach doesn't work.

So, when I try for example $mech->get("https://mail.yahoo.com/");
I again get 407 error.....

It seems that UserAgent works differently for HTTP and HTTPS...
correct me if I am wrong.

regards,
Prateek


On 21 Oct 2005 05:29:42 -0700, Gisle Aas <[email protected]> wrote:
> Prateek <[email protected]> writes:
>
> > It seems that LWP::UserAgent does not support proxy with authentication.
>
> Proxies with authentication is supported.  See:
>
>    http://search.cpan.org/~gaas/libwww-perl-5.803/lwpcook.pod#PROXIES
>
> Regards,
> Gisle
>


--
-----------------------------------------------------------------
Prateek Srivastava
2003 Batch CSE
M M M Engineering College, Gorakhpur.
INDIA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.