mod_python has empty POST

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lucas Branca

    mod_python has empty POST

    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(r eq).list
    vars = ''
    for field in form:
    if isinstance(fiel d, 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


Working...