REGRESSION(r213062): [SOUP] UTF-8 filename in Content-Disposition header incorrectly...
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2017 08:59:12 +0000 (08:59 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2017 08:59:12 +0000 (08:59 +0000)
commit1a85d79a4955091a1aa8eb3c0b3a8800a4a28df6
treef922bbedd483f199d48b74595fb5f1c944bfb248
parent567fd5f4ae484f465b4c3b43e46e0390a4def813
REGRESSION(r213062): [SOUP] UTF-8 filename in Content-Disposition header incorrectly handled since r213062
https://bugs.webkit.org/show_bug.cgi?id=169024

Reviewed by Youenn Fablet.

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. This patch brings back
the String::fromUTF8WithLatin1Fallback call but only when the header string is 8 bit one.

Fixes: http/tests/download/literal-utf-8.html

* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::platformSuggestedFilename):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp