Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl HTTP request through IIS proxy server
by meetraz (Hermit) on Oct 04, 2002 at 18:11 UTC | |
|
Re: perl HTTP request through IIS proxy server
by abell (Chaplain) on Oct 04, 2002 at 22:04 UTC | |
|
Re: perl HTTP request through IIS proxy server
by ybiC (Prior) on Oct 04, 2002 at 17:58 UTC |