you should specify the real proxy instead of pac file. it should be a host (with user/pass/port if needed).
Thanks 2011/5/17 tiger <[email protected]>: > 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 讨论组”论坛。 > 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 > 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 > 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。 > > -- Fayland Lam // http://www.fayland.org/ -- 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
