Example request:<br><br>GET /form.cgi?username=mille449&amp;password=saved HTTP/1.0<br><br>The query string in that request would be &quot;username=mille449&amp;password=saved&quot;, or in other words, everything following the first &quot;?&quot; in the URL.<br>

<br>As for the example code, yes, that would not read the POST data... perhaps the intent was just to show a way to handle the simple case, so that we can build off of it?  In any case, yes, that example code will fail to read in POST data, thus it should probably not get full credit.<br>

<br>To read until the request is complete... this is an example of something that we can figure out through investigation.  One way to go about this would be to use form.html from way back in HW1.  Set the &quot;method&quot; to point to your web server, and then use print statements to figure out what the data looks like when it comes in.  (Might be useful to use repr() on the incoming data to see exactly what it looks like)<br>

<br>I don&#39;t know what &quot;end of request&quot; will look like myself (though I have a couple of guesses) so at this point I can&#39;t be any more helpful than that.<br><br>--Joe<br><br><div class="gmail_quote">On Fri, Oct 2, 2009 at 5:58 PM, Tim Miller <span dir="ltr">&lt;<a href="mailto:mille449@msu.edu">mille449@msu.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Titus,<br>
<br>
In the assignment for hw4 you specify:<br>
<br>
The server should respond to both GET and POST requests, and should<br>
read and ignore any GET query strings and POST data.<br>
<br>
However in your example code you have a line that looks like this:<br>
<br>
if &#39;\r\n\r\n&#39; in data_so_far:  # complete GET request - respond &amp; close<br>
<br>
If I understand correctly, the server would stop receiving after the<br>
first &#39;\r\n\r\n&#39; and would not read the POST data, so how do I read<br>
until the request is complete, assuming there is no Content-Length<br>
header?  Also, how are GET query strings specified again?  I can&#39;t<br>
seem to find it anywhere.<br>
<br>
Thanks<br>
<br>
<br>
--Tim<br>
<br>
_______________________________________________<br>
cse491-fall-2009 mailing list<br>
<a href="mailto:cse491-fall-2009@lists.idyll.org">cse491-fall-2009@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/cse491-fall-2009" target="_blank">http://lists.idyll.org/listinfo/cse491-fall-2009</a><br>
</blockquote></div><br>