Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi all. Long time reader, first time poster. I'm hopeful that an IO::Socket::SSL expert can help me with an issue I'm having.

$sock = IO::Socket::SSL->new( PeerAddr => 'myserver.com', PeerPort => '443', SSL_verify_mode => 'SSL_VERIFY_NONE') || warn "There was a problem: ".IO::Socket::SSL::errostr();
First, I'm connecting to the server, and not verifying it. It's an internal box and, rightly or wrongly, trust it implicitly.
sub senddata { if ($debug) { print ">> @_"; } print $sock @_; }
I'm adding this to make the rest make sense. Just a routine to print to the screen if I'm doing some debugging. Now I send my headers...
$contlen=length($content); &senddata("POST /login.aspx HTTP/1.1\r\n"); &senddata("Host: myserver.com\r\n"); &senddata("Connection: keep-alive\r\n");
etc..etc... (I'm not posting content for obvious reasons) Now, here is my problem. The next header is "Referer". As soon as the webserver received an R I get "RENEGOTIATING". So, my question is. How do I send my Referer header and deal with the renegotation coming from the web server (Which happens to be MS ISS. I hope all that makes sense.

Replies are listed 'Best First'.
Re: IO::Socket::SSL and handling renegotiation
by nelgin (Initiate) on Jun 18, 2013 at 19:42 UTC
    Not sure why this posted as anonymous earlier...anyway, I figured it out. I was making an assumption which proved wrong. Got it working now.
      I get exactly the same problem. Do you remember the solution? Thanks