HELP!!! I am writing a perl program to get some data out of an Oracle web site. I could not seem to pass our IIS proxy server. I am using ActivePerl "v5.6.1 built for MSWin32-x86-multi-thread".

Here are the codes:

use LWP::UserAgent; my $ORASEARCH = 'http://updates.oracle.com/ARULink/PatchSearch/process_form?product_fa +mily=&product=&release=&platform=&language=0&patch_type =&file=&orderby=abr.last_updated_date&process=Submit&email=&userid=&bu +g=' ; my $ORAUID = 'userid' ; my $ORAPASSWD = 'password' ; my $LWPUA ; { $LWPUA = LWP::UserAgent->new; print &lookup_patch_desc(1324710) ; } sub lookup_patch_desc { my $BUGNO = $_[0] ; my $REQUEST = HTTP::Request->new(GET => $ORASEARCH . $BUGNO); $REQUEST->header('Accept' => 'text/html') ; $LWPUA->proxy(http => 'http://proxy.mycompany.com:80/') ; $REQUEST->proxy_authorization_basic("windowuserid","windowpassword +") ; $REQUEST->authorization_basic($ORAUID,$ORAPASSWD); return $LWPUA->request($REQUEST)->as_string; }

Here are the outputs:

HTTP/1.1 407 (Proxy Authentication Required) Proxy authentication requ +ired Proxy-Authenticate: NTLM Proxy-Authenticate: Basic realm="10.4.1.78" Content-Length: 503 Content-Type: text/html Content-Type: text/html; charset=iso-8859-1 Client-Date: Fri, 04 Oct 2002 17:26:03 GMT Client-Peer: 101.41.1.178:80 Client-Warning: Unsupported authentication scheme 'ntlm' Title: Error 407 X-Meta-Robots: noindex <html><head><title>Error 407</title> <meta name="robots" content="noindex"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1 +"></head> <body> <h2>HTTP Error 407</h2> <p><strong>407 Proxy Authentication Required</strong></p> <p>You must authenticate with a proxy server before this request can b +e serviced . Please log on to your proxy server, and then try again.</p> <p>Please contact the Web server's administrator if this problem persi +sts.</p> </body></html>

All helps will be greatly appreciated!

Peter


In reply to perl HTTP request through IIS 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.