RESOLVED FIXED 169024
REGRESSION(r213062): [SOUP] UTF-8 filename in Content-Disposition header incorrectly handled since r213062
https://bugs.webkit.org/show_bug.cgi?id=169024
Summary REGRESSION(r213062): [SOUP] UTF-8 filename in Content-Disposition header inco...
Carlos Garcia Campos
Reported 2017-03-01 01:46:56 PST
This made test http/tests/download/literal-utf-8.html to start failing. The problem is that I removed the conversion made by String::fromUTF8WithLatin1Fallback that was added in r176930. I removed it because that made fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html to timeout.
Attachments
Patch (2.12 KB, patch)
2017-03-01 01:50 PST, Carlos Garcia Campos
youennf: review+
Carlos Garcia Campos
Comment 1 2017-03-01 01:50:26 PST
Michael Catanzaro
Comment 2 2017-03-01 06:42:43 PST
Comment on attachment 303055 [details] Patch I don't understand it. You convert the header from UTF-8 to the internal encoding (UTF-16)... but only if it's ASCII...?
Carlos Garcia Campos
Comment 3 2017-03-01 09:12:18 PST
(In reply to comment #2) > Comment on attachment 303055 [details] > Patch > > I don't understand it. You convert the header from UTF-8 to the internal > encoding (UTF-16)... but only if it's ASCII...? In r176930 ResourseResponse was changes to not apply any encoding conversion from message headers when adding them to the header map. So, we create the String with String constructor no String__fromaUTF8() so that we don't actually make any charset conversion. The header could be either utf8 or latin1, so we try to convert to utf8, only when it's not, falling back to latin1 if the conversion fails.
Carlos Garcia Campos
Comment 4 2017-03-01 09:38:21 PST
WebKit Commit Bot
Comment 5 2017-03-01 12:57:17 PST
Re-opened since this is blocked by bug 169051
Carlos Garcia Campos
Comment 6 2017-03-02 00:58:17 PST
Note You need to log in before you can comment on or make changes to this bug.