Weird cgi error
Gerardo Herzig
gherzig at fmed.uba.ar
Mon Feb 25 07:55:49 EST 2008
Jesse Aldridge wrote:
>I uploaded the following script, called "test.py", to my webhost.
>It works find except when I input the string "python ". Note that's
>the word "python" followed by a space. If I submit that I get a 403
>error. It seems to work fine with any other string.
>What's going on here?
>
>Here's the script in action: http://crookedgames.com/cgi-bin/test.py
>
>Here's the code:
>
>#!/usr/bin/python
>print "Content-Type: text/html\n"
>print """
><html>
><body>
> <form action="test.py" method="post">
> <textarea name="data">
> </textarea>
> <INPUT type="submit" value="Submit">
> </form>
></body>
></html>
>"""
>
>
If you cant have access to the apache (?) error_log, you can put this in
your code:
import cgitb
cgitb.enable()
Which should trap what is being writed on the error stream and put it on
the cgi output.
Gerardo
More information about the Python-list
mailing list