2011年5月16日星期一

[PerlChina] LWP::UserAgnet->get(https://...) not work through proxy

Could anyone help on the following test script (run on strawberry
perl)?

It works (with $ua->proxy... commented out) when it is not behind
proxy, but fails to access https pagethrough proxy (with '_msg' =>
'Bad Request'.). It is okay to access http pages. No problem for
accessing https pages with MSIE and Firfox through proxy.

Thanks,


use strict;
use LWP::UserAgent;
use Data::Dumper;

my $ua=LWP::UserAgent->new();
$ua->proxy(['https', 'http'] => 'http://corppac.myclient.com/
accelerated_pac_base.pac');
my $response = $ua->get('https://login.yahoo.com/config/login_verify2?
&.src=ym'
);
#my $response = $ua->get('http://www.yahoo.com');
print Dumper $response;

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

没有评论: