[cse491] proj5 handle and delegate

C. Titus Brown ctb at msu.edu
Sun Sep 28 06:21:50 PDT 2008


On Sat, Sep 27, 2008 at 11:01:23PM -0400, Alex Nolley wrote:
-> I have another question now regarding requests sent via the POST command
-> from a client to the server. Since the client could be sending an
-> arbitrarily large amount of data (a long message to a forum perhaps) it
-> seems like our server should keep accepting data until the client has sent
-> it all. I'm thinking it won't be too hard to accomplish this using a loop
-> that keeps appending new data to an existing variable, but how do we know
-> when the client has finished transferring? Right now I've got a rudimentary
-> version working that pulls in 1024 bits, appends that to a growing variable
-> and then checks the last 1024 bits for the string '\r\n\r\n' and if that
-> exists, exits the loop. I know, this is a horrible way to do it, but I'm
-> figuring that someone has a better method.

Hey Alex,

the \r\n\r\n signifies the end of the headers; the Content-Length header
specifies the length of the content following the headers.  Does that
help?

cheers,
--titus
-- 
C. Titus Brown, ctb at msu.edu



More information about the cse491-fall-2008 mailing list