upload file using cgi on Win2k IIS

Ignacio Vazquez-Abrams ignacio at openservices.net
Thu Oct 11 14:54:56 EDT 2001


On Thu, 11 Oct 2001, Jeff Shannon wrote:

> Jason McWilliams wrote:
>
> >
> > Here is something interesting.  I can upload .txt and .doc files no
> > problem,
> > no matter what the size.  Things die when trying to upload .gif or .zip
> > or .tgz
> > or other binaries similar.  Some of it gets uploaded, but only a small
> > portion?
> >
> > I am at a loss now.
>
> A wild guess--is it possible that the binary files have an embedded EOF-character?
> IIS (or Windows) could conceivably see that embedded character and decide that it is
> indeed at the end of file, even though there's more data in the real file....

The odd thing is that the file should be base64-encoded before it's sent to
the server, so it NULLs and EOFs shouldn't be visible to the server.

Jason, instead of importing cgi.py, write the raw data from sys.stdin to a
file and check to see if that's the case.

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>

   "As far as I can tell / It doesn't matter who you are /
    If you can believe there's something worth fighting for."
       - "Parade", Garbage





More information about the Python-list mailing list