Re: Fixed: Truncated uploads in mod_perl 1 from FF2.0/Win

Joe Schaefer <[email protected]>
Newsgroups gmane.comp.apache.apreq
Message-ID <[email protected]>
Adam Nash <[email protected]> writes:

> Hello, not long ago I ran into the bug described in these links:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=356470
> https://bugzilla.mozilla.org/show_bug.cgi?id=369414
> http://mail-archives.apache.org/mod_mbox/httpd-apreq-dev/200701.mbox/ajax/%[email protected]%3e
>
> After a lot of investigation, I'm pretty sure I've found what's happening.  
> The problem is not quite the behavior described in the linked apache mailing 
> list message, "What's happening is that occasionally, we get a 0 byte 
> payload".  Firefox 2 for Windows is often sending single byte payloads (which 
> is really dumb, but evidently should be allowable behavior), but libapreq is 
> ignoring that single byte when it happens to be character 0A (a linefeed).  

Right, since it's the start of a boundary.  I think the best way
to fix this is to do what php does and add a loop into fill_buffer
so it completely fills the buffer instead of doing a single read.
Php uses our multipart code for handling uploads, and that's probably
why they haven't seen this bug crop up.

-- 
Joe Schaefer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.