here is my script which is trying to access two websites, from my linux box. i 
am not able to figure, why am i getting "501 Not Implemented" for any https 
website.


especially when the firefox browser from the same box can access the websites 
fine using same proxy. proxy does not require username/password authentication.


I do have Crypt::SSLeay installed.



#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
$ua->proxy(['https', 'http', 'ftp'], 'http://myproxy.net:8080/');
$ua->agent('Mozilla/5.0');


my $response = $ua->get( 'http://www.yahoo.com' , ':content_file' => 
"testhttp.html" );
 if ($response->is_success) {
     print "success\n";
 }
 else {
    print "error\n";
    # die $response->status_line;
 }

$response = $ua->get('https://mail.yahoo.com', ':content_file' => 
'testhttps.html');
 if ($response->is_success) {
     print "success\n";   #$response->decoded_content;  # or whatever
 }
 else {
    print "error\n";
     die $response->status_line;
 }

Reply via email to