Bug 181506 - [Curl] Extract multipart handling from ResourceHandle to CurlRequest.
Summary: [Curl] Extract multipart handling from ResourceHandle to CurlRequest.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Basuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-10 16:45 PST by Basuke Suzuki
Modified: 2018-01-11 13:37 PST (History)
7 users (show)

See Also:


Attachments
Patch (9.32 KB, patch)
2018-01-10 16:49 PST, Basuke Suzuki
no flags Details | Formatted Diff | Diff
patch (34.87 KB, patch)
2018-01-10 17:05 PST, Basuke Suzuki
achristensen: review+
Details | Formatted Diff | Diff
Patch (37.11 KB, patch)
2018-01-11 12:23 PST, Basuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-cq-01 for mac-sierra (2.23 MB, application/zip)
2018-01-11 13:26 PST, WebKit Commit Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Basuke Suzuki 2018-01-10 16:45:30 PST
Move multipart handling tasks into newly created class CurlMultiHandler and be prepared for NetworkLoadTask.
Comment 1 Basuke Suzuki 2018-01-10 16:49:45 PST
Created attachment 330988 [details]
Patch
Comment 2 Basuke Suzuki 2018-01-10 17:05:47 PST
Created attachment 330991 [details]
patch
Comment 3 Alex Christensen 2018-01-10 17:42:20 PST
Comment on attachment 330991 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=330991&action=review

> Source/WebCore/platform/network/curl/CurlMultipartHandle.cppSource/WebCore/platform/network/curl/MultipartHandle.cpp:303
> +bool CurlMultipartHandle::matchForBoundary(const char* data, size_t position, size_t& matchedLength)

Could this return a std::optional<size_t> instead?

> Source/WebCore/platform/network/curl/CurlMultipartHandle.cppSource/WebCore/platform/network/curl/MultipartHandle.cpp:339
> +    char* p = const_cast<char*>(content);

Do we need this to be a non-const char*?  I don't see us writing to it.
Comment 4 Don Olmstead 2018-01-10 17:45:38 PST
Comment on attachment 330991 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=330991&action=review

> Source/WebCore/platform/network/curl/CurlMultipartHandle.cppSource/WebCore/platform/network/curl/MultipartHandle.cpp:3
> + * Copyright (C) 2017 Sony Interactive Entertainment Inc.

Copyright (C) 2018
Comment 5 Basuke Suzuki 2018-01-11 11:54:10 PST
Comment on attachment 330991 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=330991&action=review

>> Source/WebCore/platform/network/curl/CurlMultipartHandle.cppSource/WebCore/platform/network/curl/MultipartHandle.cpp:3
>> + * Copyright (C) 2017 Sony Interactive Entertainment Inc.
> 
> Copyright (C) 2018

Yeah. Happy new year.

>> Source/WebCore/platform/network/curl/CurlMultipartHandle.cppSource/WebCore/platform/network/curl/MultipartHandle.cpp:303
>> +bool CurlMultipartHandle::matchForBoundary(const char* data, size_t position, size_t& matchedLength)
> 
> Could this return a std::optional<size_t> instead?

No, when return true, first argument is meaningful. On the other case, second argument is used. We'll refactor later, but not this time.

>> Source/WebCore/platform/network/curl/CurlMultipartHandle.cppSource/WebCore/platform/network/curl/MultipartHandle.cpp:339
>> +    char* p = const_cast<char*>(content);
> 
> Do we need this to be a non-const char*?  I don't see us writing to it.

Right.
Comment 6 Basuke Suzuki 2018-01-11 12:23:49 PST
Created attachment 331095 [details]
Patch

Fixed reviewed points
Comment 7 WebKit Commit Bot 2018-01-11 13:26:45 PST
Comment on attachment 331095 [details]
Patch

Rejecting attachment 331095 [details] from commit-queue.

New failing tests:
webgl/1.0.2/conformance/uniforms/uniform-default-values.html
Full output: http://webkit-queues.webkit.org/results/6039153
Comment 8 WebKit Commit Bot 2018-01-11 13:26:47 PST
Created attachment 331108 [details]
Archive of layout-test-results from webkit-cq-01 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: webkit-cq-01  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 9 Don Olmstead 2018-01-11 13:34:12 PST
I don't see how a change to curl would have anything to do with a mac failure and I've also seen this test fail in another bug.

Just going to manually commit it..
Comment 10 Don Olmstead 2018-01-11 13:36:30 PST
Comment on attachment 331095 [details]
Patch

Clearing flags on attachment: 331095

Committed r226800: <https://trac.webkit.org/changeset/226800>
Comment 11 Don Olmstead 2018-01-11 13:36:32 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Radar WebKit Bug Importer 2018-01-11 13:37:20 PST
<rdar://problem/36448712>