RESOLVED FIXED 118468
[Curl] Download fails for certain urls.
https://bugs.webkit.org/show_bug.cgi?id=118468
Summary [Curl] Download fails for certain urls.
peavo
Reported 2013-07-08 05:54:32 PDT
The current Curl download implementation has a few shortcomings: 1) Downloading from secure locations fails. We need to provide Curl with the path to a certificate file (.pem file). 2) Cookies are not set in the download request. We need to give Curl the path to the cookie file. 3) When a normal load is converted to a download, some of the headers from the original request is not sent (e.g. Referer, User agent).
Attachments
Patch (9.96 KB, patch)
2013-07-08 10:58 PDT, peavo
no flags
Patch (10.05 KB, patch)
2013-07-22 08:49 PDT, peavo
no flags
peavo
Comment 1 2013-07-08 10:58:45 PDT
Brent Fulgham
Comment 2 2013-07-20 18:21:16 PDT
Comment on attachment 206260 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206260&action=review Looks good. Please address my minor comments when you land! > Source/WebCore/platform/network/curl/CurlDownload.cpp:352 > + String value = it->value; This could be a const reference to avoid a copy. > Source/WebCore/platform/network/curl/CurlDownload.cpp:353 > + String headerString(key); You convert an AtomicString to a String in 351, then make a copy here. Why not just do "String headerString(it->key);"? > Source/WebCore/platform/network/curl/CurlDownload.cpp:405 > + writeDataToFile(static_cast<char*>(data), size); Why are you casting to a char*? The function signature is "const char*".
peavo
Comment 3 2013-07-22 08:49:09 PDT
peavo
Comment 4 2013-07-22 08:51:31 PDT
(In reply to comment #2) Thanks for reviewing! Updated patch accordingly. > (From update of attachment 206260 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=206260&action=review > > Looks good. Please address my minor comments when you land! > > > Source/WebCore/platform/network/curl/CurlDownload.cpp:352 > > + String value = it->value; > > This could be a const reference to avoid a copy. > > > Source/WebCore/platform/network/curl/CurlDownload.cpp:353 > > + String headerString(key); > > You convert an AtomicString to a String in 351, then make a copy here. Why not just do "String headerString(it->key);"? > > > Source/WebCore/platform/network/curl/CurlDownload.cpp:405 > > + writeDataToFile(static_cast<char*>(data), size); > > Why are you casting to a char*? The function signature is "const char*".
Brent Fulgham
Comment 5 2013-07-22 08:51:38 PDT
Comment on attachment 207250 [details] Patch Nice work! r=me.
WebKit Commit Bot
Comment 6 2013-07-22 09:34:00 PDT
Comment on attachment 207250 [details] Patch Clearing flags on attachment: 207250 Committed r152976: <http://trac.webkit.org/changeset/152976>
WebKit Commit Bot
Comment 7 2013-07-22 09:34:02 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.