durusmail: quixote-users: Problems with uploading demo
Problems with uploading demo
2002-11-18
2002-11-18
Problems with uploading demo
Greg Ward
2002-11-18
On 18 November 2002, xtian said:
> The error is:
> Unable to parse HTTP request.
> Invalid request: upload request length mismatch: expected 1999 bytes, got
> 1954

Damn.  I wondered if adding that error was a good idea or not.

> Comparing the orginal file with the temporary one shows that they're
> identical, both with 1704 bytes (I assume the extra bytes are from the MIME
> wrapper?).

Correct -- to see all 1999 (1954) bytes, run a packet tracer on port 80
while doing the upload.  If nothing else, you'll then appreciate how
unnecessarily complex HTTP upload is (not to mention how inefficient it
is for simple form variables).

> I can make it run happily by commenting out the call to check_length_read in
> process_inputs, but I'd rather not have to do that. Does anyone have any
> suggestions?
>
> I'm on Win98, using Xitami 2.4d9. Could it be anything to do with
> line-ending chars? Or is the webserver setting up the CGI environment
> incorrectly?

Line-endings would be my first guess, assuming the browser is Windows
and the server is Unix (or vice-versa).  If both ends are running the
same OS, look for another cause.  Try a different browser for starters.
Run a packet tracer (I'm a big fan of ethereal myself -- see
www.ethereal.com) and see if the browser is really sending the number of
bytes that it's promising.  Replace your Quixote app with a simple CGI
script that just dumps the environment and stdin, and make sure that
your web server is putting the right info in the CGI environment.

Finally, I suspect you'll have to comment out the call to
check_length_read() anyways.  Sounds like I'll end up removing it, but
please do some digging into this problem -- I'd like to find out *why*!

        Greg
--
Greg Ward - software developer                gward@mems-exchange.org
MEMS Exchange                            http://www.mems-exchange.org

reply