Bug 159350 - Synchronous preflight should check for successful responses
Summary: Synchronous preflight should check for successful responses
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: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-01 06:57 PDT by youenn fablet
Modified: 2016-07-30 12:28 PDT (History)
8 users (show)

See Also:


Attachments
Patch (10.03 KB, patch)
2016-07-01 07:03 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-yosemite (782.37 KB, application/zip)
2016-07-01 07:49 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (762.06 KB, application/zip)
2016-07-01 07:53 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-yosemite (1.41 MB, application/zip)
2016-07-01 07:59 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews126 for ios-simulator-wk2 (633.30 KB, application/zip)
2016-07-01 08:00 PDT, Build Bot
no flags Details
Rebasing new test expectation (10.03 KB, patch)
2016-07-01 09:38 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (11.27 KB, patch)
2016-07-30 11:02 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-cq-03 for mac-yosemite (802.35 KB, application/zip)
2016-07-30 11:50 PDT, WebKit Commit Bot
no flags Details
Patch for landing (10.71 KB, patch)
2016-07-30 11:58 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2016-07-01 06:57:18 PDT
Synchronous preflight should check for successful responses
Comment 1 youenn fablet 2016-07-01 07:03:13 PDT
Created attachment 282546 [details]
Patch
Comment 2 Build Bot 2016-07-01 07:49:48 PDT
Comment on attachment 282546 [details]
Patch

Attachment 282546 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1606695

New failing tests:
http/tests/xmlhttprequest/access-control-preflight-not-successful.html
Comment 3 Build Bot 2016-07-01 07:49:52 PDT
Created attachment 282549 [details]
Archive of layout-test-results from ews100 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 4 Build Bot 2016-07-01 07:53:39 PDT
Comment on attachment 282546 [details]
Patch

Attachment 282546 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1606708

New failing tests:
http/tests/xmlhttprequest/access-control-preflight-not-successful.html
Comment 5 Build Bot 2016-07-01 07:53:42 PDT
Created attachment 282550 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-07-01 07:59:54 PDT
Comment on attachment 282546 [details]
Patch

Attachment 282546 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1606710

New failing tests:
http/tests/xmlhttprequest/access-control-preflight-not-successful.html
Comment 7 Build Bot 2016-07-01 07:59:57 PDT
Created attachment 282551 [details]
Archive of layout-test-results from ews114 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 8 Build Bot 2016-07-01 08:00:40 PDT
Comment on attachment 282546 [details]
Patch

Attachment 282546 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1606711

New failing tests:
http/tests/xmlhttprequest/access-control-preflight-not-successful.html
Comment 9 Build Bot 2016-07-01 08:00:42 PDT
Created attachment 282552 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 10 youenn fablet 2016-07-01 09:38:45 PDT
Created attachment 282557 [details]
Rebasing new test expectation
Comment 11 youenn fablet 2016-07-29 06:28:09 PDT
Ping review?
Comment 12 Darin Adler 2016-07-29 12:06:00 PDT
Comment on attachment 282557 [details]
Rebasing new test expectation

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

> Source/WebCore/loader/CrossOriginPreflightChecker.cpp:142
> +    bool isRedirect = request.url() != response.url();

Is this a correct check? Is there no other way the two URLs could be non-equal? For example, could the response one be missing the username and password part? Or missing the part after the #?
Comment 13 youenn fablet 2016-07-30 11:02:44 PDT
Created attachment 284947 [details]
Patch for landing
Comment 14 youenn fablet 2016-07-30 11:04:16 PDT
(In reply to comment #12)
> Comment on attachment 282557 [details]
> Rebasing new test expectation
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282557&action=review
> 
> > Source/WebCore/loader/CrossOriginPreflightChecker.cpp:142
> > +    bool isRedirect = request.url() != response.url();
> 
> Is this a correct check? Is there no other way the two URLs could be
> non-equal? For example, could the response one be missing the username and
> password part? Or missing the part after the #?

Right, this check is the same as the one from DocumentThreadableLoader and suffer from the same issue. Since the scope is bit different than for DocumentThreadableLoader, I changed it to something less restrictive using URL::strippedForUseAsReferrer before comparison.
Comment 15 WebKit Commit Bot 2016-07-30 11:50:22 PDT
Comment on attachment 284947 [details]
Patch for landing

Rejecting attachment 284947 [details] from commit-queue.

New failing tests:
http/tests/xmlhttprequest/access-control-preflight-headers-sync.html
Full output: http://webkit-queues.webkit.org/results/1780716
Comment 16 WebKit Commit Bot 2016-07-30 11:50:28 PDT
Created attachment 284948 [details]
Archive of layout-test-results from webkit-cq-03 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: webkit-cq-03  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 17 youenn fablet 2016-07-30 11:58:33 PDT
Created attachment 284949 [details]
Patch for landing
Comment 18 WebKit Commit Bot 2016-07-30 12:28:25 PDT
Comment on attachment 284949 [details]
Patch for landing

Clearing flags on attachment: 284949

Committed r203943: <http://trac.webkit.org/changeset/203943>
Comment 19 WebKit Commit Bot 2016-07-30 12:28:32 PDT
All reviewed patches have been landed.  Closing bug.