Dear Monks,

I am trying to make an HTTPS request across the proxy server. I am using LWP::UserAgent. I have downloaded and installed openssl and Crypt::SSleay. My operating system is Windows 2000. My HTTPS request is successful, but I do not get any content. The response->as_string method outputs:

#############################################
HTTP/1.0 200 OK
Content-Type: text/html
Client-Date: Fri, 13 Dec 2002 02:39:25 GMT
Client-Response-Num: 1
Refresh: 0; URL=https://www.ultimatix.net
<HTML></HTML>
############################################

This happens whatever I try to do. I have tried out almost every thing. I have even created ssl certificate and used the same. But nothing works. I do not get the content.

My code looks like this
sub GetBaseURL{ my($lstrURL)=@_; my $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1"); $ua->proxy([qw(https http)], "http://proxy.compaq.com:8080"); $ENV{HTTPS_VERSION}='3'; #$ENV{HTTPS_CERT_FILE}="C:/openssl/private/CAcert.pem"; #$ENV{HTTPS_KEY_FILE}="C:/openssl/private/CAkey.pem"; $ENV{HTTPS_PKCS12_FILE}="C:/openssl/binu.p12"; $ENV{HTTPS_PKCS12_PASSWORD}='passcode'; #$ENV{HTTPS_PROXY}="http://proxy.compaq.com:8080"; $ua->timeout(1000); my $request=HTTP::Request->new(POST=> $lstrURL); my $response=$ua->request($request); #my $response=$ua->get($lstrURL) or die "cannot fetch $lstrURL: $!"; if ($response->is_success){ return $response->as_string; }else{ return $response->code; } }
Please bail me out. Suggest me a way to make HTTPS request across the proxy.

Regards,
Binu

In reply to HTTPS Call across proxy server by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.