[cse491] proj5 handle and delegate

Alex Nolley nolleyal at msu.edu
Sat Sep 27 20:01:23 PDT 2008


So, here's my leading question, in response to your question: if
they were combined in the call to 'delegate' is there any way to
pull them apart again, i.e. to distinguish between the GET and POST
data?  If so, then it doesn't matter.  If not, then it potentially
matters.

Ok that makes sense.

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.

Thanks,
Alex





More information about the cse491-fall-2008 mailing list