On Jan 10, 2008, at 6:50 AM, Malcolm wrote:
On Wednesday 09 January 2008 10:28:39 pm Mark Alway wrote:
(did I get this sent to the list or just back to Malcolm...I don't
see
the list address in the subscribe confirmation?)
Just to me. cc'd back to the list
I'm having a very similar problem. My setup: Apache/2.2.6 (Unix)
mod_ssl/2.2.6 t/mixed mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/
v5.8.6
I'm using a very simple Upload script for testing and every 4th or
5th
upload from a Safari browser the server just hangs. After the 60
seconds specified as the timeout in my Apache config the error_log
reports:
[Wed Jan 09 18:49:09 2008] [error] [client 192.168.1.6] (70007)The
timeout specified has expired: ap_get_brigade failed during prefetch,
referer: http://192.168.1.2/test_upload.html
[Wed Jan 09 18:49:09 2008] [error] Internal apreq error
What's your Timeout set to in the apache config?
60 seconds. It doesn't take 60 seconds upload a 43 byte file on a
local network.
If I was to click on a different link or stop the browser while
waiting for the server I get this in the error log:
[error] End of file found
If you stop the browser whilst it's uploading, then I'd expect that
behaviour - you've interupted the POST.
Well yes, but only because it hangs....the file is uploaded by the
browser is hung and if I don't click something it will timeout and
error.
When I used the $io->read() function versus <$io> the message reads:
[error] Apache2::RequestIO::read: (70014) End of file found at (eval
23) line 5
I can reproduce this but only with Safari browsers. Firefox seems
immune. I ran a TCP dump of the process with a 43 byte uploaded file
and couldn't see any noticeable differences between the way the
browsers posted. Using <$io> seems to be better than $io->read() but
both still exhibit the problem.
Can you reproduce it with the 43 byte file, or was that just for
comparing the
dumps? I'm only running into this after around a few hundred Kb, and
then
it's dependent on line quality (thus doesn't happen during on-site
testing).
It happens with the 43 byte file too. I used something small for
testing to make sure it wasn't just related to file size limits.
Below is my HTML form file and Mod_Perl script. Both incredibly
simple, but causing a major headache:
--------- HTML -----------
<form method="post" action="test_upload.cgi" enctype="multipart/form-
data" name="student_info"> <input type="text" name="good" /> <input
type="file" name="upload_photo" /> <input type="submit"> </form>
------------- ModPerl Code --------------
use strict;
use warnings;
use Apache2::RequestUtil;
use Apache2::Request;
use Apache2::Upload;
my $r = Apache2::RequestUtil->request();
my $req = Apache2::Request->new($r);
# Get the photo that was uploaded
my $upload = $req->upload('upload_photo');
my $size = $upload->size();
open(WRITE, ">/usr/local/apache2/html/0001.jpg") or die("Can't open
0001.jpg for write $!");
my $io = $upload->io;
print WRITE while <$io>;
close(WRITE);
print "Content-type: text/html\n\n";
print "Success";
exit;
Mark Alway
[EMAIL PROTECTED]