[cse491] proj5 handle and delegate

C. Titus Brown ctb at msu.edu
Sat Sep 27 13:47:12 PDT 2008


On Sat, Sep 27, 2008 at 04:26:45PM -0400, Alex Nolley wrote:
-> I have a question regarding the structure of the delegate function. Delegate
-> has the following structure:
-> delegate(request_type, path, received_headers, GET_data, POST_data) where
-> GET_ and POST_ data will be the dictionary of key, value pairs returned by
-> parse_qs(). Why do we need two variables for this? Couldn't we just use one
-> variable like 'qs_dict' that takes the place of both GET_data and POST_data?
-> To me it seems like the only instance where it would be useful to have both
-> variables is if the client somehow returned both GET and POST data in one
-> request. Is this even possible?

Good question! Try:

<form method='POST' action='/some/url?blah=foo&blah2=fubar'>
<input type='text' name='blah'>
</form>

:)

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.

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



More information about the cse491-fall-2008 mailing list