http://qs321.pair.com?node_id=351578

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

I am trying to pick up a POST request which appears to be stopping at the header which contains two '\r\n'. I'm not certain it's that or if I need to handle a Continuation differently. I have Etheral open on the request which displays the header in a POST / HTTP/1.0 and the body is on the next lined labeled Continuation.
Should the server close the $addr connection upon reading the two \r\n or should something else be set within the server? All of the data is coming to my server. It just stops at the initial Header.
I've tried closing the connection, thinking a new connection would be made upon continuation but that does not work.
I have also tried to replicate the client side by building a perl client test with the \r\n\r\n in and it works fine. The client making the request is coming from a MS tool. Is there a character conflict that anyone knows of? I also tried catching \015\012\015\012 but I am not sure what should be done at the Continuation point.
use IO::Socket; $local = IO::Socket::INET->new( Proto => 'tcp', LocalAddr => '192.168.150.131:80', Reuse => 1 ) or die "$!"; $local->listen(); print "Awaiting client...\n"; my $addr; while ($addr = $local->accept() ) { $addr->autoflush(1); print "Connecting from: ", $addr->peerhost(); print " Port: ", $addr->peerport(), "\n"; while (<$addr>) { # Should a catch go here upon the \r\n\r\n and close conn # or a call to accept continuation? # Everything is coming into the computer # The server just stops print "Client: $_"; } close $addr; # close client print "Idle...\n"; }
Any suggestions would be greatly appreciated. I have hit complete discombobulation mode.
Thanks for the help,
DWW