When uploading a file with the curl backend cancel is always called at the end of the upload, so the file has been uploaded, the response has been received from the server but no result is shown.
Created attachment 23907 [details] Don't call cancel if the upload was successful FormDataStream::read() returns 0 when retrieving data from the form fails, but also when there is no more data to send. This means that cancel is always called even when the data was successfully sent.
This patch prevents cancellation of a request, but still does not successfully upload the file. Here is what I tried, open rapidshare.com and try uploading a file. I observed the HTTP traffic and noticed that POST packet is not seen, i.e. nothing is posted to the server!
(In reply to comment #2) > This patch prevents cancellation of a request, but still does not successfully > upload the file. > Here is what I tried, > open rapidshare.com and try uploading a file. > I observed the HTTP traffic and noticed that POST packet is not seen, i.e. > nothing is posted to the server! Really? I tried it and upload was working even before. What doesn't work is showing the page you get after you upload a file. I suspect that your problem could be a separate issue, I will test it in the next days.
I merged the latest code in my code and it is able POST the contents successfully now. The problem which you mentioned that next page is not displayed, when I included the patch that is provided for this bug with the latest code the code started working fine. So I think if you merge the patch for this bug in the latest code uploading will work fine!
Comment on attachment 23907 [details] Don't call cancel if the upload was successful Sounds reasonable. The only complain would be to always put the Vector on the stack. In the majority of code we have early exits. e.g if (!httpBody()) return false; return m_formDataElementIndex < m_resourceHandle()->request().httpBody()->elements().size(); but this is no hard requirement but something to keep in mind.
Okay this does not even compile because of the const, non-const mismatch. I will land a compiling version.
The patch was applied. Closing this bug.