Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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 => '', 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,

In reply to Socket stops at Header not handling Continuation by dwatson06

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2023-10-01 22:31 GMT
Find Nodes?
    Voting Booth?

    No recent polls found