Bug 191741

Summary: XMLHttpRequest has the wrong fallback encoding
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: XMLAssignee: Rob Buis <rbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, ews-watchlist, rbuis, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews100 for mac-sierra
none
Archive of layout-test-results from ews105 for mac-sierra-wk2
none
Patch
none
Archive of layout-test-results from ews102 for mac-sierra
none
Archive of layout-test-results from ews106 for mac-sierra-wk2
none
Patch
none
Archive of layout-test-results from ews107 for mac-sierra-wk2
none
Archive of layout-test-results from ews123 for ios-simulator-wk2
none
Patch
none
Archive of layout-test-results from ews123 for ios-simulator-wk2
none
Patch
none
Patch
none
Patch none

Description Anne van Kesteren 2018-11-16 00:26:11 PST
See https://github.com/web-platform-tests/wpt/pull/14090.
Comment 1 Rob Buis 2018-11-21 01:51:27 PST
Created attachment 355397 [details]
Patch
Comment 2 EWS Watchlist 2018-11-21 02:38:58 PST
Comment on attachment 355397 [details]
Patch

Attachment 355397 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/10097481

Number of test failures exceeded the failure limit.
Comment 3 EWS Watchlist 2018-11-21 02:38:59 PST
Created attachment 355398 [details]
Archive of layout-test-results from ews100 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 4 EWS Watchlist 2018-11-21 02:47:43 PST
Comment on attachment 355397 [details]
Patch

Attachment 355397 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/10097488

Number of test failures exceeded the failure limit.
Comment 5 EWS Watchlist 2018-11-21 02:47:45 PST
Created attachment 355399 [details]
Archive of layout-test-results from ews105 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 6 Rob Buis 2018-11-21 03:52:37 PST
Created attachment 355400 [details]
Patch
Comment 7 EWS Watchlist 2018-11-21 04:54:41 PST
Comment on attachment 355400 [details]
Patch

Attachment 355400 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/10098189

New failing tests:
imported/w3c/web-platform-tests/encoding/unsupported-encodings.html
imported/w3c/web-platform-tests/encoding/replacement-encodings.html
imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.html
imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.worker.html
Comment 8 EWS Watchlist 2018-11-21 04:54:43 PST
Created attachment 355401 [details]
Archive of layout-test-results from ews102 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 9 EWS Watchlist 2018-11-21 05:06:39 PST
Comment on attachment 355400 [details]
Patch

Attachment 355400 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/10098209

New failing tests:
imported/w3c/web-platform-tests/encoding/unsupported-encodings.html
imported/w3c/web-platform-tests/encoding/replacement-encodings.html
imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.html
imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.worker.html
Comment 10 EWS Watchlist 2018-11-21 05:06:41 PST
Created attachment 355402 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 11 Rob Buis 2018-11-21 06:43:03 PST
Created attachment 355408 [details]
Patch
Comment 12 EWS Watchlist 2018-11-21 07:55:39 PST
Comment on attachment 355408 [details]
Patch

Attachment 355408 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/10099193

New failing tests:
imported/w3c/web-platform-tests/encoding/replacement-encodings.any.worker.html
imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.worker.html
swipe/pushState-cached-back-swipe.html
Comment 13 EWS Watchlist 2018-11-21 07:55:41 PST
Created attachment 355412 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 14 EWS Watchlist 2018-11-21 08:50:05 PST
Comment on attachment 355408 [details]
Patch

Attachment 355408 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10099263

New failing tests:
imported/w3c/web-platform-tests/encoding/replacement-encodings.any.worker.html
imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.worker.html
Comment 15 EWS Watchlist 2018-11-21 08:50:07 PST
Created attachment 355418 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 16 Rob Buis 2018-11-21 11:59:50 PST
Created attachment 355432 [details]
Patch
Comment 17 EWS Watchlist 2018-11-21 21:09:49 PST
Comment on attachment 355432 [details]
Patch

Attachment 355432 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10105882

New failing tests:
media/no-fullscreen-when-hidden.html
Comment 18 EWS Watchlist 2018-11-21 21:09:50 PST
Created attachment 355462 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 19 Rob Buis 2019-02-18 01:07:05 PST
Created attachment 362268 [details]
Patch
Comment 20 Rob Buis 2019-04-16 07:42:01 PDT
Created attachment 367535 [details]
Patch
Comment 21 Alex Christensen 2019-04-16 11:23:57 PDT
Comment on attachment 367535 [details]
Patch

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

> LayoutTests/imported/w3c/ChangeLog:3
> +        XMLHttpRequest seemingly has the wrong fallback encoding

Remove seemingly.

> LayoutTests/imported/w3c/web-platform-tests/encoding/replacement-encodings.any.worker-expected.txt:12
> +FAIL replacement - non-empty input decodes to one replacement character. assert_equals: Decoding with replacement expected "U+FFFD" but got "U+0041/U+0042/U+0043/U+0061/U+0062/U+0063/U+0031/U+0032/U+0033/U+FFFD"

What would it take too make this pass at the same time?  Does this pass in Chrome and Firefox?  I can't figure out how to run this test from http://w3c-test.org/encoding/
Comment 22 Rob Buis 2019-04-16 13:43:32 PDT
Created attachment 367562 [details]
Patch
Comment 23 Rob Buis 2019-04-16 13:48:26 PDT
Comment on attachment 367535 [details]
Patch

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

>> LayoutTests/imported/w3c/ChangeLog:3
>> +        XMLHttpRequest seemingly has the wrong fallback encoding
> 
> Remove seemingly.

Right, that was a bit silly, done.

>> LayoutTests/imported/w3c/web-platform-tests/encoding/replacement-encodings.any.worker-expected.txt:12
>> +FAIL replacement - non-empty input decodes to one replacement character. assert_equals: Decoding with replacement expected "U+FFFD" but got "U+0041/U+0042/U+0043/U+0061/U+0062/U+0063/U+0031/U+0032/U+0033/U+FFFD"
> 
> What would it take too make this pass at the same time?  Does this pass in Chrome and Firefox?  I can't figure out how to run this test from http://w3c-test.org/encoding/

Maybe you don't know this convenient site yet?:
https://wpt.fyi/results/encoding/replacement-encodings.any.html?label=master&product=chrome%5Bexperimental%5D&product=edge&product=firefox%5Bexperimental%5D&product=safari%5Bexperimental%5D&aligned
So yes it passes in Chrome and Firefox.
I have not looked at the FAIL before, unfortunately I am traveling until Thursday. IMHO this patch is an improvement in itself and I suspect the fix for above is not in XMLHttpRequest.cpp.
Comment 24 WebKit Commit Bot 2019-04-17 03:11:18 PDT
Comment on attachment 367562 [details]
Patch

Clearing flags on attachment: 367562

Committed r244377: <https://trac.webkit.org/changeset/244377>
Comment 25 WebKit Commit Bot 2019-04-17 03:11:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 26 Radar WebKit Bug Importer 2019-04-17 03:15:19 PDT
<rdar://problem/49972266>