Summary: | [Curl] Download fails for certain urls. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | peavo | ||||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bfulgham, commit-queue, galpeter | ||||||
Priority: | P2 | Keywords: | Curl | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
peavo
2013-07-08 05:54:32 PDT
Created attachment 206260 [details]
Patch
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*". Created attachment 207250 [details]
Patch
(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*". Comment on attachment 207250 [details]
Patch
Nice work! r=me.
Comment on attachment 207250 [details] Patch Clearing flags on attachment: 207250 Committed r152976: <http://trac.webkit.org/changeset/152976> All reviewed patches have been landed. Closing bug. |