Just wondering if anyone has encountered this before and if it's been fixed
in libapreq for the upcoming release.

Basically, whenever I try and use Mozilla 0.97 with a file upload field on a
form and don't select any file in the field, libapreq seems to hang on the
$R->parse() call. Mozilla 0.98 seems to work fine, but 0.97 doesn't. While
it's easy enough to just say "upgrade", it's still annoying that it hangs a
process for a while until our alarm goes off.

A couple of things I've noticed, the Mozilla 0.97 file fields might be a bit
broken. The raw POST request data is:

... stuff deleted ...
-----------------------------5965166491649760492719885386
Content-Disposition: form-data; name="FMC-UploadFile1"; filename=""
Content-Type: application/octet-stream

-----------------------------5965166491649760492719885386
... more stuff deleted ...

While under Mozilla 0.98, which doesn't hang libapreq, the request data is:

... stuff deleted ...
-----------------------------20448977631102520059783368690
Content-Disposition: form-data; name="FMC-UploadFile1"; filename=""
Content-Type: application/octet-stream


-----------------------------20448977631102520059783368690
... more stuff deleted ...

Note the extra blank line, which I think the lack of is causing the problem
under 0.97.

I did an strace under 0.97 and got:

read(4, "POST /mail/~354ad16bd30a20352/ H"..., 4096) = 2621
rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0
time(NULL)                              = 1012943782
alarm(60)                               = 60
alarm(0)                                = 60
rt_sigaction(SIGALRM, NULL, {0x80ee530, [], SA_INTERRUPT|0x4000000}, 8) = 0
dup2(15, 2)                             = 2
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
brk(0x9574000)                          = 0x9574000
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigaction(SIGALRM, {0x81c7c1c, [], SA_RESTART|0x4000000}, {0x80ee530, [],
SA_INTERRUPT|0x4000000}, 8) = 0
alarm(60)                               = 0
brk(0x9575000)                          = 0x9575000
brk(0x9576000)                          = 0x9576000
alarm(60)                               = 60
read(4,

So, it seems to be hanging because it's trying to read more data when there
isn't any. If I do basically the same request under IE I get:

read(4, "POST /mail/~354ad16bd30a20352/ H"..., 4096) = 2536
rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0
time(NULL)                              = 1012944362
alarm(60)                               = 60
alarm(0)                                = 60
rt_sigaction(SIGALRM, NULL, {0x80ee530, [], SA_RESTART|0x4000000}, 8) = 0
dup2(15, 2)                             = 2
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigaction(SIGALRM, {0x81c7c1c, [], SA_RESTART|0x4000000}, {0x80ee530, [],
SA_RESTART|0x4000000}, 8) = 0
alarm(60)                               = 0
alarm(60)                               = 60

and it keeps going and works fine. Anyone know what might be happening? How
to fix it?

Rob


Reply via email to