Re: Bug Report - uploads truncated

Geoffrey Young <[email protected]>
Newsgroups gmane.comp.apache.apreq,gmane.text.xml.cocoon.devel
Message-ID <[email protected]>
I'm cross-posting this to apreq-dev - since you're using Apache::Request
and it seems to be behaving differently using mp1 versus mp2, the apreq
folks will be in a better position to comment on the behavior.

--Geoff

Miles Crawford wrote:
> 
> I posted this to the Firefox guys as well, because I believe it may be
> an issue with their browser, but even if it isn't a mod_perl issue
> perhaps you guys have insights I could use to help fill out the bug
> report I filed with them?
> 
> Perl version v5.8.5 for Apache/1.3.33 (Unix) mod_ssl/2.8.23 OpenSSL/0.9.8
> mod_perl/1.29
> 
> When posting a file to the following CGI, as demonstrated at the
> provided URL,
> larger files get truncated.  An example file that truncates is located at:
> http://mcrawfor.surge.eplt.washington.edu/mcrawfor/frank_lloyd.pdf
> 
> Notice that this file is about 4mb, but when uploaded through the
> following CGI
> using Firefox 2 on Windows, it is truncated to roughly 2.5mb.
> 
> If you look at the truncated files in a hex editor, there is a strange
> similarity in the point the file is truncated:
> 
> truncated point:
> 00274fe0:  d6 4c 64 b7 c9 f5 c1 3f  e3 4f a2 8a 28 a2 8a 28 
> .Ld....?.O..(..(
> 00274ff0:  a2 8a 28 a2 8a 2b cd 3f  68 9f 0f f8 c3 c6 1f -- 
> ..(..+.?h......-
> valid file:
> 00274fe0:  d6 4c 64 b7 c9 f5 c1 3f  e3 4f a2 8a 28 a2 8a 28 
> .Ld....?.O..(..(
> 00274ff0:  a2 8a 28 a2 8a 2b cd 3f  68 9f 0f f8 c3 c6 1f 0a 
> ..(..+.?h.......
> 00275000:  75 cf 04 f8 2f 41 4d 46  f7 c4 16 af 66 cc f7 89 
> u.../AMF....f...
> 
> All the files I checked are cut off right before a "0a" byte that rolls
> over to the next round filesize.
> 
> I have checked this with Firefox 1.5 and 2.0 on a variety of platforms,
> and have only seen it using Firefox 2.0 on Windows posting to mod_perl
> 1. mod_perl 2 doesn't seem to have this problem.
> 
> _____________
> #!/usr/bin/perl
> 
> my $r = shift;
> 
> use Apache::Request;
> 
> my $apr = Apache::Request->new($r);
> my $handle = $apr->upload('upload')->fh();
> 
> open STORE, ">stored";
> while( my $line  = <$handle>){
>     print STORE $line;
> }
> close STORE;
> 
> print "Content-type: text/plain\n\n". `du 'stored'`;
> ______________
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Upload the sample file to the provided URL or CGI script using
> Firefox 2.0
> on Windows
> 2.Check the Uploaded filesize.
> 3.
> Actual Results:
> Only part of the file is uploaded.
> 
> Expected Results:
> The whole file should be uploaded ;)
> 
> I'm setting the severity to major considering the large number of
> mod_perl 1.3
> applications in production use - Here at the University of Washington we
> are
> getting more and more complaints about this as people upgrade to FF 2.0
> 
> 
> Thanks!
> 
> -Miles
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
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.