Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to access an https URL with WWW::Mechanize.

I get a Microsoft IIS error message saying that I need an SSL connection, and I should change the URL to "https". Which doesn't help because it's already "https".

I have my HTTPS_PROXY set up, and I can get to other https urls. I have Crypt::SSLeay installed. Any ideas?

Replies are listed 'Best First'.
Re: WWW::Mechanize and https URL error
by Anonymous Monk on Dec 04, 2009 at 02:09 UTC
    Turn debugging on, show some headers
      Good idea. Here you go:
      LWP::UserAgent::new: () LWP::UserAgent::proxy: http http://proxyserver:8080 LWP::UserAgent::proxy: ARRAY(0x1e75ca4) http://proxyserver:8080/ LWP::UserAgent::proxy: http http://proxyserver:8080/ LWP::UserAgent::proxy: https http://proxyserver:8080/ LWP::UserAgent::request: () HTTP::Cookies::add_cookie_header: Checking www.bar.foo.gov for cookies HTTP::Cookies::add_cookie_header: Checking .bar.foo.gov for cookies HTTP::Cookies::add_cookie_header: Checking bar.foo.gov for cookies HTTP::Cookies::add_cookie_header: Checking .foo.gov for cookies HTTP::Cookies::add_cookie_header: Checking foo.gov for cookies HTTP::Cookies::add_cookie_header: Checking .gov for cookies LWP::UserAgent::send_request: GET https://www.bar.foo.gov/page.asp LWP::UserAgent::_need_proxy: Proxied to http://proxyserver:8080/ LWP::Protocol::http::request: () LWP::Protocol::collect: read 829 bytes LWP::Protocol::collect: read 580 bytes LWP::UserAgent::request: Simple response: Forbidden

      Nothing there that helps me, I'm afraid.

        May be target site ask you for certificate?

Re: WWW::Mechanize and https URL error
by frieduck (Hermit) on Dec 04, 2009 at 23:01 UTC
    You're bypassing Crypt::SSLeay and asking LWP::Useragent to contact the proxy directly. See the Crypt::SSLeay docs on using it via a proxy.
Re: WWW::Mechanize and https URL error
by gmargo (Hermit) on Dec 04, 2009 at 17:22 UTC

    Does the client work without using the proxy? Are you asking for help to debug the client or to debug the proxy?