Bug 191741 - XMLHttpRequest has the wrong fallback encoding
Summary: XMLHttpRequest has the wrong fallback encoding
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-16 00:26 PST by Anne van Kesteren
Modified: 2019-04-17 03:15 PDT (History)
6 users (show)

See Also:


Attachments
Patch (401.37 KB, patch)
2018-11-21 01:51 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-sierra (8.69 MB, application/zip)
2018-11-21 02:38 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews105 for mac-sierra-wk2 (8.38 MB, application/zip)
2018-11-21 02:47 PST, EWS Watchlist
no flags Details
Patch (8.13 KB, patch)
2018-11-21 03:52 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-sierra (2.52 MB, application/zip)
2018-11-21 04:54 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews106 for mac-sierra-wk2 (3.04 MB, application/zip)
2018-11-21 05:06 PST, EWS Watchlist
no flags Details
Patch (18.70 KB, patch)
2018-11-21 06:43 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-sierra-wk2 (3.05 MB, application/zip)
2018-11-21 07:55 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.40 MB, application/zip)
2018-11-21 08:50 PST, EWS Watchlist
no flags Details
Patch (21.41 KB, patch)
2018-11-21 11:59 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (945.24 KB, application/zip)
2018-11-21 21:09 PST, EWS Watchlist
no flags Details
Patch (22.54 KB, patch)
2019-02-18 01:07 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (22.77 KB, patch)
2019-04-16 07:42 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (22.75 KB, patch)
2019-04-16 13:43 PDT, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>