CGI File Size Limit?
Lyle Johnson
jlj at cfdrc.com
Tue May 2 10:00:03 EDT 2000
More information about the Python-list mailing list
Tue May 2 10:00:03 EDT 2000
- Previous message (by thread): CGI File Size Limit?
- Next message (by thread): CGI File Size Limit?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ed, Don't know if this is the answer or not, but doing a search for "cgi" on the Python FAQ (http://www.python.org/search/search_faq.html) yielded this hit: 7.12. cgi.py (or other CGI programming) doesn't work sometimes on NT or win95! Be sure you have the latest python.exe, that you are using python.exe rather than a GUI version of python and that you have configured the server to execute "...\python.exe -u ..." for the cgi execution. The -u (unbuffered) option on NT and win95 prevents the interpreter from altering newlines in the standard input and output. Without it post/multipart requests will seem to have the wrong length and binary (eg, GIF) responses may get garbled (resulting in, eg, a "broken image"). Hope this helps, Lyle Ed wrote: > > More information: > If I test the len(form["userfile"].value), it is only 3134 instead of > 18k (the "CONTENT_LENGTH"). That means the CGI.py module is not > getting the data. Something wrong with CGI module reading binary data > off of the standard input stream. > > Have I confirmed that it is a problem with the cgi.py module? > > Ed wrote: > > > I'm having trouble uploading an 18K file via CGI and saving it to a > > file from my Python script. The file gets saved, but the file size > > is only 1k. I'm assuming that the cgi module is only reading the > > first 1k bytes. I'd like to know if this sounds reasonable and how > > to solve the problem....and if not reasonable, where else I might > > look for the problem. Thanks....
- Previous message (by thread): CGI File Size Limit?
- Next message (by thread): CGI File Size Limit?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list