file upload CGI error

°­»ó¹è typeon at netsgo.com
Thu Dec 21 00:27:07 EST 2000


try again

<form enctype="multipart/form-data" action=... method=post>
...
</form>

<sparrowhawk9909 at my-deja.com> wrote in message
news:91s24b$cf8$1 at nnrp1.deja.com...
> I was using python 1.5.1 as CGI script with IIS
> on windows NT. That was
> working fine. But when I upgrade to python 1.5.2,
> every time I upload
> binary file such as GIF files cause CGI error.
> I've tried python 1.6
> and python 2.0 also, but the result was same.
> Followings are the
> error message.
>
> CGI Error
> The specified CGI application misbehaved by not
> returning a complete set
> of HTTP headers. The headers it did return are:
>
>
> Traceback (most recent call last):
>   File "C:\InetPub\wwwroot\python\sample2
> \upload.py", line 5, in ?
>     form = cgi.FieldStorage()
>   File "c:\inetpub\wwwroot\cgi.py", line 869, in
> __init__
>     self.read_multi(environ, keep_blank_values,
> strict_parsing)
>   File "c:\inetpub\wwwroot\cgi.py", line 954, in
> read_multi
>     headers = rfc822.Message(self.fp)
>   File "c:\python\lib\rfc822.py", line 92, in
> __init__
>     self.readheaders()
>   File "c:\python\lib\rfc822.py", line 135, in
> readheaders
>     startofline = tell()
> IOError: (0, 'Error')
>
> Can anyone help me out ?
> Thanks.
>
>
>
>
> Sent via Deja.com
> http://www.deja.com/





More information about the Python-list mailing list