Odd cgi.FieldStorage behavior
Tim Roberts
timr at probo.com
Thu Mar 4 03:00:36 EST 2004
vxg49 at yahoo.com (Fred Murray) wrote:
>
>When uploading a file ("input type=file"), FieldStorage usually
>behaves correctly, but every once in a while (every couple days?), it
>will suddenly start causing internal server errors. A look at the
>apache (v. 2.0.44 on Linux) error log shows "premature end of script
>headers" with no error messages from Python. After reloading the
>browser about 10 times in a row, it will suddenly start working again.
> Recently, when a series of these errors was occuring, I removed the
>FieldStorage line from my program and it completed normally. When I
>put the line back in again, the internal server errors resumed. Thus,
>it seems that the bug is either in FieldStorage itself or in something
>FieldStorage interacts with.
>
>It seems odd that that there are no errors in the log from Python.
>Does this mean the program is crashing before it can output a
>traceback to stderr?
It often means the script terminated normally without outputting any HTML,
or that you caught an error with a try/finally and didn't reraise the
error.
--
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list