durusmail: quixote-users: GET, POST, QUERY_STRING and FieldStorage
GET, POST, QUERY_STRING and FieldStorage
2003-03-22
2003-03-22
2003-03-25
Re: GET, POST, QUERY_STRING and FieldStorage
2003-03-25
2003-03-25
GET, POST, QUERY_STRING and FieldStorage
Lucio Torre
2003-03-22
Hello all,

I have an application that uses quixote and needs to work with forms. My problem
arises when i want to read the values in QUERY_STRING when the user performed a
POST. If the REQUEST_METHOD is GET, then the keys and values are in
request.form, but if it is POST, they are not. I can only find the values from
the form.

I traced the issue back to FieldStorage. This class will choose only one source
for data depending on the request method. Because i needed the query string, i
changed my application so that with every POST request, the query string
parameters are aded to the form dictionary.

So, here are my questions:
- Is request.form the correct way i should read the query string?
- Is this behaviour a feature or a bug?
- Should quixote read from post data *and* query string? If yes, id be happy to
produce a patch.
- Should FieldStorage read from post data *and* query string?

Thanks in advance,

Lucio.


reply