[cse491] HW #5: URLs, Query Strings, and POST

C. Titus Brown ctb at msu.edu
Fri Oct 9 13:26:30 PDT 2009


On Fri, Oct 09, 2009 at 02:22:03PM -0400, Joe Amenta wrote:
> How should our program deal with each of the following two cases (newline
> means \r\n for readability):
> 
> POST /process_form?name=Joe&num=4&color=blue&case=upper HTTP/1.0
> Host: localhost
> Port: 1237
> Content-length: 46
> Content-type: application/x-www-form-urlencoded
> 
> name=Titus%20Brown&num=3&color=red&case=upper
> 
> and
> 
> POST /process_form?name=Joe&num=4&color=blue&case=upper HTTP/1.0
> Host: localhost
> Port: 1237
> Content-length: 4096
> Content-type: application/octet-stream
> 
> [insert 4096 bytes of random gibberish]

Up to you, but you SHOULD process both sets of data into a single form.  If you
want a ruling, let's go with... POST data supercedes query string content.

(For those who are wondering what Joe is asking look at the query strings
in the URL (after the POST) and the 'content'.  He's asking in what order
he should process the query string and POST data.)

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



More information about the cse491-fall-2009 mailing list