mod_python has empty POST

L

Lucas Branca

python 2.1.3
Debian woody
Apache 1.3.26
mod python 2.7.8

## ---- formtest.html ---- ##
<form action="/formtest.py/main" method="POST">
<input type="submit" value="go" name="action">
<input type="hidden" name="hide" value="A">
</form>


## ---- formtest.py ------ ##
import mod_python

def main(req):
form = mod_python.util.FieldStorage(req).list
vars = ''
for field in form:
if isinstance(field, mod_python.util.Field):
vars = "%s [%s] = %s" % (vars, field.name, field.value)
return(vars)

## ---- results ---- ##
if method is "POST" variable form is an empty list !!! <---- WRONG

if method is "GET" it's all right and I receive
a string containing : "[action] = go [hide] = A"

why I cannot access POST variables?????
... I'm bouncing like a ball ....
help!


Lucas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top