I got "500 proxy connect failed: PROXY ERROR HEADER, could be non-SSL URL" message when I ran my code. Could someone please help me? I am using Perl version 5.10. Here is the code:
1. #!/usr/bin/perl 2. use LWP::UserAgent; 3. use HTTP::Request::Common; 4. use Crypt::SSLeay; 5. 6. $url = "https://encrypted.google.com/"; 8. my $ua = new LWP::UserAgent; 9. 10. $ENV{HTTPS_PROXY} = 'http://westproxy:8080'; 11. $ENV{HTTPS_PROXY_USERNAME} = "UserName"; 12. $ENV{HTTPS_PROXY_PASSWORD} = "PWD"; 13. #$ENV{HTTPS_CA_FILE} = ??? 14. 15. #$ua->proxy(https => 'http://westproxy:8080'); 16. my $req = new HTTP::Request('GET'=>$url); 17. my $res = $ua->request($req); 18. 19. if ($res->is_success){ 20. print "Content: \n", $res->content, "\n"; 21. }
If I uncomment line #15, $ua->proxy(https => 'http://westproxy:8080'). I got another message "Denied Access. Use PAC file in the browser settings to ensure that requests for internal web sites do not traverse the Enterprise proxies". Do I need to set HTTPS_CA_FILE ENV? If I do, is it the certificate of our website? Thanks.

In reply to Access to https page. by Toomy

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.