cgi.FieldStorage and POST

Jeff Hinrichs jlh at
Wed Jan 2 00:20:24 EST 2002

I'm playing with python's cgi module and I am encountering an unexpected

I have a form that will work if I use method="GET", .FieldStorage() returns
the expected values.  But if I change the method in the form to POST,
.FieldStorage() is empty.
...code snippet...
    form = cgi.FieldStorage()
    print form.keys()
a GET returns ['a', 'c', 'cmdUpload']
a POST returns []

The form is simplistic, 1 input, 1 hidden and 1 submit

I am running other python cgi's with no problem.  Running ActiveState Python
2.1.1 build 212
I assume that I'm doing something wrong, but searching on google hasn't
resulted in my clue phone ringing.


More information about the Python-list mailing list