Changeset 279490 in webkit
- Timestamp:
- Jul 1, 2021, 6:03:53 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-cors.https.window-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/beacon/NavigatorBeacon.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r279472 r279490 1 2021-07-01 Alex Christensen <achristensen@webkit.org> 2 3 Align beacon CORS mode with Chrome and Firefox 4 https://bugs.webkit.org/show_bug.cgi?id=227590 5 6 Reviewed by Chris Dumez. 7 8 * web-platform-tests/beacon/beacon-cors.https.window-expected.txt: 9 1 10 2021-07-01 Youenn Fablet <youenn@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-cors.https.window-expected.txt
r279224 r279490 2 2 PASS /common/redirect.py does not support CORS 3 3 PASS cross-origin, CORS-safelisted: type = string 4 FAIL cross-origin, CORS-safelisted: type = arraybuffer assert_true: timeout expected true got false 4 PASS cross-origin, CORS-safelisted: type = arraybuffer 5 5 PASS cross-origin, CORS-safelisted: type = form 6 FAIL cross-origin, CORS-safelisted: type = blob assert_true: timeout expected true got false 6 PASS cross-origin, CORS-safelisted: type = blob 7 7 PASS cross-origin, non-CORS-safelisted: failure case (with redirect) 8 8 PASS cross-origin, non-CORS-safelisted: failure case (without redirect) -
trunk/Source/WebCore/ChangeLog
r279489 r279490 1 2021-07-01 Alex Christensen <achristensen@webkit.org> 2 3 Align beacon CORS mode with Chrome and Firefox 4 https://bugs.webkit.org/show_bug.cgi?id=227590 5 6 Reviewed by Chris Dumez. 7 8 This follows https://w3c.github.io/beacon/#sec-processing-model step 6.3. 9 Now we pass a WPT test that Chrome and Firefox already passed. 10 11 * Modules/beacon/NavigatorBeacon.cpp: 12 (WebCore::NavigatorBeacon::sendBeacon): 13 1 14 2021-07-01 Amir Mark Jr <amir_mark@apple.com> 2 15 -
trunk/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp
r278253 r279490 131 131 132 132 if (body) { 133 options.mode = FetchOptions::Mode:: Cors;133 options.mode = FetchOptions::Mode::NoCors; 134 134 String mimeType; 135 135 auto result = FetchBody::extract(WTFMove(body.value()), mimeType); … … 143 143 if (!mimeType.isEmpty()) { 144 144 request.setHTTPContentType(mimeType); 145 if ( isCrossOriginSafeRequestHeader(HTTPHeaderName::ContentType, mimeType))146 options.mode = FetchOptions::Mode:: NoCors;145 if (!isCrossOriginSafeRequestHeader(HTTPHeaderName::ContentType, mimeType)) 146 options.mode = FetchOptions::Mode::Cors; 147 147 } 148 148 }
Note:
See TracChangeset
for help on using the changeset viewer.