XHR: Fallback to UTF-8 encoding if specified encoding is not valid
Previously, if the encoding returned by XMLHttpRequest::FinalResponseCharset() is invalid, Latin-1 encoding was used due to the logic in TextResourceDecoder::DefaultEncoding(). After this CL, the encoding determined by the latter half of XMLHttpRequest::CreateDecoder() is used in such cases, which is UTF-8 for text. Bug: 905968 Change-Id: I04e6ae524b8e1d3abd21e4a7a10279eb5638a58c Reviewed-on: https://chromium-review.googlesource.com/c/1342813 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:
Kouhei Ueno <kouhei@chromium.org> Reviewed-by:
Adam Rice <ricea@chromium.org> Reviewed-by:
Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#632816}
Showing
Please register or sign in to comment