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

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

I am in the process of writing a server that will accept an xml file, parse it, then send a response back based on the file.

I have successfully written the Server and a mock Client in Perl which communicate wonderfully through a tcp connection on port 80. The problem is, when the actual client connects using their client app, it passes a POST header which the server takes in but it stops responding when the xml data is passed.

At this point I want to take in all the information from the client request. I have a packet sniffer open and it's showing me the POST request which the server accepts and writes. After that, the sniffer shows a continuation which holds the XML data from the client. The server stops after printing the Header POST, and no XML is printed.

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() ) { print "Connecting from: ", $addr->peerhost(); print " Port: ", $addr->peerport(), "\n"; while (<$addr>) { print "Client: $_"; } close $addr; # close client print "Idle...\n"; }


Any suggestions would be greatly appreciated.

Thank you,
DWW