Bug #2118
closedmod_uploadprogress submits multiple times
Description
Sometimes, when posting large files that takes a lot of time to process and when using mod_uploadprogress, lighttpd artificially submits the request again. In the logs it looks like this:
/progress?X-Progress-ID=abcdefgh /progress?X-Progress-ID=abcdefgh .. repeated lots of times POST /post/handler 302 5 POST /post/handler 200 -
First I thought there was something wrong with my javascript code, but then I tried it in nginx with their mod_uploadprogress module and the request is not resubmitted. This is with lighttpd 1.5.0 r2533.
Updated by stbuehler over 15 years ago
- Status changed from New to Need Feedback
What do you mean with "lighttpd submits the request again"? You think lighty sends the POST body twice to a backend? I don't think that is possible, as there is no code to duplicate it (and especially mod_uploadprogress only watches the connection).
And what "log" is that? It's neither access.log nor error.log...
If your browser sends the request twice, i don't see why that should be lighty's fault.
Updated by bjourne over 15 years ago
Yes it appears that lighty is sending the POST body twice to the backend. I verified using wireshark that it is not my browser that is sending the request again. And the excerpt is output from access.log. I didn't think it would be useful to paste the whole log.
Updated by stbuehler over 15 years ago
You didn't think a good explanation what happened is necessary?...
If "302" is the first status code you got, your request was obviously redirected, and so the browser had to send it twice and your observation was wrong.
Updated by bjourne over 15 years ago
I don't know what you want me to do. I repeated the test multiple times over two days and observed the same problem. Though if you think I'm making shit up, please close this bug.
Updated by stbuehler over 15 years ago
No, I'm saying there is no usable information. You crippled your access-log, and I have no idea what you are doing and what results you are getting.
(Ok, to be honest I'm guessing you did something wrong, and we don't have a real bug. And I really don't think lighty duplicates a request. Perhaps we have a bug to get two lines in the access.log for one request, but I think that is very unlikely too.)
Updated by ilya.kasnacheev over 15 years ago
I want to confirm: We seem to observe exactly the same bug.
Lighttpd 1.5, some of requests show in log twice; even worse, they are processed twice by lighttpd.
There is no backend (we use mod-post-to-disk), it's just like: User does one POST, lighttpd logs (and handles) as if there were two POSTs with the interval of ~ten seconds.
I'd post some logs tomorrow.
Updated by stbuehler over 15 years ago
I don't remember having a mod-post-to-disk in the repository.
And "processed twice by lighttpd" is not a description of what happened.
Updated by ilya.kasnacheev over 15 years ago
Here is what happens:
Client submits a POST request containing large file using flash.
This POST gets logged and processed normally.
Then, if transmission interrupts for some reason, lighttpd logs another POST request into log. This phantom request doesn't have any request body (the original did), and has to-byte identical headers, including MIME boundary. (I know those headers because mod-post-to-disk records them.)
As flash player would never send two POST requests with the same MIME boundary, we can confirm that the second request is indeed phantom.
Today it happened for ~15 requests per 1000.
Would provide any additional information if necessary.
Updated by stbuehler over 15 years ago
I'm sorry, but i think the error probably is in mod_post_to_disk - and we don't have the time to support 3rd party modules. As long as you cannot show this is an error on our side I can't help you.
I guess the headers include a content-length, so it should be easy to detect the duplicates (content-length not matching, or post-body empty).
Updated by stbuehler almost 15 years ago
- Status changed from Need Feedback to Invalid
Also available in: Atom