[cse491] reading complete requests
Tim Miller
mille449 at msu.edu
Fri Oct 2 14:58:41 PDT 2009
Titus,
In the assignment for hw4 you specify:
The server should respond to both GET and POST requests, and should
read and ignore any GET query strings and POST data.
However in your example code you have a line that looks like this:
if '\r\n\r\n' in data_so_far: # complete GET request - respond & close
If I understand correctly, the server would stop receiving after the
first '\r\n\r\n' and would not read the POST data, so how do I read
until the request is complete, assuming there is no Content-Length
header? Also, how are GET query strings specified again? I can't
seem to find it anywhere.
Thanks
--Tim
More information about the cse491-fall-2009
mailing list