Hi, libwww@perl.org,

 

I've searching for answer to do a HTTPS request for work related task.
In the past 2 days, I've installed

the following modules on Perl 5.6.1 build 631 on Windows to ensure I am
working with the latest version:

  

  libwww-perl 5.64

  Crypt-SSLeay 0.51

  

 I've tried to do GET & CONNECT and keep getting 407 Proxy
Authentication Required error.  The HTTPS request is a GET to query the
status of a backend system on an Online Banking Websphere box using this

URL:

 

https://val.banking.worldsavings.com/wsb/WDSHeartBeat?heartbeat=PWS
<https://val.banking.****.com/wsb/WDSHeartBeat?heartbeat=PWS> 

and the URL send its CA certificate.

 

 Below are my codes:

  

  use Crypt::SSLeay;

  LWP::Debug::level('+conns');

  LWP::Debug::level('+trace');

  LWP::Debug::level('+debug');

  # HTTPS Proxy Support

  $ENV{HTTPS_PROXY} = 'http://sa1isa4:80 <http://sa1isa4/> ';

  

  # PROXY_BASIC_AUTH

  $ENV{HTTPS_PROXY_USERNAME} = 'myusername';

  $ENV{HTTPS_PROXY_PASSWORD} = 'mypassword';  

  

  # DEBUGGING SWITCH / LOW LEVEL SSL DIAGNOSTICS 

  $ENV{HTTPS_DEBUG} = 1;

  # DEFAULT SSL VERSION

  $ENV{HTTPS_VERSION} = '3';

  $ENV{HTTPS_CA_FILE} = 'val.banking.worldsavings.com.cer';

  $ENV{HTTPS_CA_DIR}  = 'C:/Perl/certs/';

  

  my $browser = LWP::UserAgent->new();    

  $request = HTTP::Request-new (GET =>
'https://val.banking.****.com/wsb/WDSHeartBeat?heartbeat=PWS');

  $response = $browser-request($request);

  if ($response->is_success()) {

      print $response->as_string;

  } else {

      print "Failed: ", $response->status_line, "\n";

  }

 

  The output:

  

LWP::UserAgent::new: ()

LWP::UserAgent::request: ()

LWP::UserAgent::send_request: CONNECT
https://val.banking.worldsavings.com/wsb/WDSHeartBeat?heartbeat=PWS

LWP::UserAgent::_need_proxy: Not proxied

LWP::Protocol::http::request: ()

LWP::UserAgent::request: Simple response: Internal Server Error

Failed: 500 proxy connect failed: PROXY ERROR HEADER, could be non-SSL
URL:

HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires
authorization to fulfill the request. Access to the Web Proxy service is
denied.  )

Via:1.1 SA1ISA4

Proxy-Authenticate: NTLM

Proxy-Authenticate: Kerberos

Proxy-Authenticate: Negotiate

Pragma: no-cache

Cache-Control: no-cache

Content-Type: text/html

Content-Length: 2375

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

...

 

How do I pass beyond the 407 error and use Crypt::SSLeay to use the
certificate to pass to proxy server?

Using "CONNECT" instead of "GET" also returns the same error.

  

Any input on this is greatly appreciated.

  

Thanks.

-Indra

 

 

Indra Gunawan

Corporate Internet Group

(510) 297-7991

[EMAIL PROTECTED]

 



*****************************************************************************
If you are not the intended recipient of this e-mail, please notify 
the sender immediately. The contents of this e-mail do not amend 
any existing disclosures or agreements unless expressly stated.
*****************************************************************************

Reply via email to