WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
21211
[CURL] Upload doesn't work because cancel is called
https://bugs.webkit.org/show_bug.cgi?id=21211
Summary
[CURL] Upload doesn't work because cancel is called
Marco Barisione
Reported
2008-09-29 07:27:36 PDT
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.
Attachments
Don't call cancel if the upload was successful
(3.03 KB, patch)
2008-09-29 07:42 PDT
,
Marco Barisione
zecke
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Marco Barisione
Comment 1
2008-09-29 07:42:06 PDT
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.
Amit
Comment 2
2008-10-07 02:51:25 PDT
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!
Marco Barisione
Comment 3
2008-10-07 17:37:05 PDT
(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.
Amit
Comment 4
2008-10-13 00:13:02 PDT
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!
Holger Freyther
Comment 5
2008-10-15 13:29:12 PDT
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.
Holger Freyther
Comment 6
2008-10-15 13:38:54 PDT
Okay this does not even compile because of the const, non-const mismatch. I will land a compiling version.
Holger Freyther
Comment 7
2008-10-15 13:55:02 PDT
The patch was applied. Closing this bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug