[Web-SIG] Form field dictionaries

Simon Willison cs1spw at bath.ac.uk
Fri Oct 24 22:40:58 EDT 2003


Bill Janssen wrote:
>>I'm a huge fan of being able to distinguish between that data from a 
>>query string (GET data) and data that has been POSTed. I posted my 
>>reasons for caring about this to the Quixote mailing list a few days 
>>ago, but I'll repeat them here through the magic of copy and paste:
>>[...list of reasons you want to know the HTTP command omitted...]
>  
> The way to differentiate them (if you care) is to look at the
> "command" attribute of the request object, IMO.  That would tell you
> whether you were looking at data from GET, or POST, or HEAD, or
> whatever.  I see no reason to pass the data differently, though.
> Parameters are parameters.

That doesn't work. The following is a perfectly valid form that sends 
data via GET and POST at the same time:

<form action="edit.cgi?id=5" method="post">
Name: <input type="text" name="name" value="Simon"><br>
Email: <input type="text" name="email" value="cs1spw at bath.ac.uk"><br>
<input type="submit">
</form>

I really don't understand why people are opposed to being able to tell 
the difference between GET and POST data. To me it seems like a basic 
requirement of any web library - but I'm obviously almost alone in 
thinking that.

-- 
Simon Willison
Web development weblog: http://simon.incutio.com/




More information about the Web-SIG mailing list