[Chicago-talk] LWP::UserAgent->get('https://....") invalid_request

tiger peng tigerpeng2001 at yahoo.com
Tue May 10 06:17:01 PDT 2011


Below is simplified code:

#!/usr/bin/perl -w
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;

No problem to access http://www.yahoo.com, but for access Yahoo login page
With proxy, it compain:  '_msg' => 'Bad Request',
Without set proxy, it complain:  '_msg' => 'Protocol scheme \'https\' is not 
supported (Crypt::SSLeay not installed)',





________________________________
From: Andy Lester <andy at petdance.com>
To: Chicago.pm chatter <chicago-talk at pm.org>
Sent: Mon, May 9, 2011 4:15:56 PM
Subject:Re: [Chicago-talk] LWP::UserAgent->get('https://....") invalid_request



On May 9, 2011, at 4:14 PM, tiger peng wrote:

Using LWP::UserAgent through proxy to access (GET or HEAD) https page, a Perl 
script responsed with ''_msg' => 'Bad Request'," while it is okay for POSTing on 
the same https page (redirect link is returned from POST response). There is no 
issue to access the the pages through IE/Firefox. I googled around but could not 
find any solution. 

We need to see actual code in addition to your English summary.

xoa

--
Andy Lester => andy at petdance.com => www.techworklove.com => AIM:petdance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20110510/87aed84e/attachment.html>


More information about the Chicago-talk mailing list