use WWW::Mechanize; use LWP::UserAgent; use HTTP::Headers; use strict; my $realm = "Connecting to proxyname"; my $username= "\Domain\username"; my $password= "password"; my $url = "http://home/intranet/home/someurl.htm"; my $mech = WWW::Mechanize->new( autocheck => 1); my $proxy_url = "http://proxyname:80/"; my $proxy = HTTP::Proxy->new(); open (PROXYLOG, ">proxylog.txt") || die "Can't open proxylog.txt: $!" ; my $ua; { $ua = LWP::UserAgent->new; print PROXYLOG &patchdesc(1324710); } sub patchdesc { my $bugno = $_[0]; my $request = HTTP::Request->new( GET => $url . $bugno); $ua->proxy( http => $proxy_url ); $request->proxy_authorization_basic($username,$password); return $ua->request($request)->as_string; } #my $http_user_agent = LWP::UserAgent->new; #$http_user_agent->agent( $user_agent ); #$http_user_agent->credentials( # $url, # $realm2, # $username => $password #); #my $response = $http_user_agent->get( $url ); #die "Error: ", $response->header($realm) || 'Error accessing', # "\n", $response->status_line, "\n at $url\n Aborting" # unless $response->is_success; #### HTTP/1.1 502 Proxy Error ( The ISA Server denies the specified Uniform Resource Locator (URL). ) Cache-Control: no-cache Connection: close Pragma: no-cache Via: 1.1 MOCPROXY04 Content-Length: 2315 Content-Type: text/html Content-Type: text-html; charset=Windows-1252 Client-Date: Mon, 10 Jul 2006 07:08:16 GMT Client-Peer: 10.21.90.145:80 Client-Response-Num: 1 Proxy-Connection: close Title: The page cannot be displayed X-Meta-GENERATOR: MSHTML 5.50.4522.1800 X-Meta-ROBOTS: NOINDEX The page cannot be displayed ...something here which i think not important..

HTTP 502 Proxy Error - The ISA Server denies the specified Uniform Resource Locator (URL). (12202)Internet Security and Acceleration Server


Technical Information (for support personnel)