[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

ap at apple.com ap at apple.com
Wed Dec 22 18:27:40 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cec44cd5a1f466e57adf9c6497df18f4ab77f298
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Dec 11 06:15:17 2010 +0000

    2010-12-10  Alexey Proskuryakov  <ap at apple.com>
    
            Reviewed by Darin Adler.
    
            https://bugs.webkit.org/show_bug.cgi?id=46573
            <rdar://problem/8479389> REGRESSION: charset="utf-8" (with quotes) doesn't work
    
            * http/tests/mime/quoted-charset-expected.txt: Added.
            * http/tests/mime/quoted-charset.php: Added.
    2010-12-10  Alexey Proskuryakov  <ap at apple.com>
    
            Reviewed by Darin Adler.
    
            https://bugs.webkit.org/show_bug.cgi?id=46573
            <rdar://problem/8479389> REGRESSION: charset="utf-8" (with quotes) doesn't work
    
            Test: http/tests/mime/quoted-charset.php
    
            * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
            * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit):
            Work around a CFNetwork issue, strip quotes if they are present.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73836 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index db43262..2ebc296 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-10  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46573
+        <rdar://problem/8479389> REGRESSION: charset="utf-8" (with quotes) doesn't work
+
+        * http/tests/mime/quoted-charset-expected.txt: Added.
+        * http/tests/mime/quoted-charset.php: Added.
+
 2010-12-10  Mihai Parparita  <mihaip at chromium.org>
 
         Unreviewed Chromium test expectation update.
diff --git a/LayoutTests/http/tests/mime/quoted-charset-expected.txt b/LayoutTests/http/tests/mime/quoted-charset-expected.txt
new file mode 100644
index 0000000..31f6e44
--- /dev/null
+++ b/LayoutTests/http/tests/mime/quoted-charset-expected.txt
@@ -0,0 +1,3 @@
+Should say SUCCESS: SUССЕSS
+
+The latter has some Cyrillic characters that look like Latin ones. This test verifies that decoding is correctly performed.
diff --git a/LayoutTests/http/tests/mime/quoted-charset.php b/LayoutTests/http/tests/mime/quoted-charset.php
new file mode 100644
index 0000000..a753778
--- /dev/null
+++ b/LayoutTests/http/tests/mime/quoted-charset.php
@@ -0,0 +1,12 @@
+<?php
+    header('Content-type: text/html; charset="koi8-r"');
+?>
+
+<p>Should say SUCCESS: SUóóåSS</p>
+<p>The latter has some Cyrillic characters that look like Latin ones. This test verifies that decoding
+is correctly performed.</p>
+
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0fc2db5..8aca6ee 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-10  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46573
+        <rdar://problem/8479389> REGRESSION: charset="utf-8" (with quotes) doesn't work
+
+        Test: http/tests/mime/quoted-charset.php
+
+        * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
+        * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit):
+        Work around a CFNetwork issue, strip quotes if they are present.
+
 2010-12-10  Vincent Scheib  <scheib at chromium.org>
 
         Reviewed by James Robinson.
diff --git a/WebCore/platform/network/cf/ResourceResponseCFNet.cpp b/WebCore/platform/network/cf/ResourceResponseCFNet.cpp
index 469e5ad..ebeff41 100644
--- a/WebCore/platform/network/cf/ResourceResponseCFNet.cpp
+++ b/WebCore/platform/network/cf/ResourceResponseCFNet.cpp
@@ -79,6 +79,11 @@ void ResourceResponse::platformLazyInit()
     m_expectedContentLength = CFURLResponseGetExpectedContentLength(m_cfResponse.get());
     m_textEncodingName = CFURLResponseGetTextEncodingName(m_cfResponse.get());
 
+    // Workaround for <rdar://problem/8757088>, can be removed once that is fixed.
+    unsigned textEncodingNameLength = m_textEncodingName.length();
+    if (textEncodingNameLength >= 2 && m_textEncodingName[0] == '"' && m_textEncodingName[textEncodingNameLength - 1] == '"')
+        m_textEncodingName = m_textEncodingName.substring(1, textEncodingNameLength - 2);
+
     m_lastModifiedDate = toTimeT(CFURLResponseGetLastModifiedDate(m_cfResponse.get()));
 
     RetainPtr<CFStringRef> suggestedFilename(AdoptCF, CFURLResponseCopySuggestedFilename(m_cfResponse.get()));
diff --git a/WebCore/platform/network/mac/ResourceResponseMac.mm b/WebCore/platform/network/mac/ResourceResponseMac.mm
index e1f1790..c73028a 100644
--- a/WebCore/platform/network/mac/ResourceResponseMac.mm
+++ b/WebCore/platform/network/mac/ResourceResponseMac.mm
@@ -74,6 +74,12 @@ void ResourceResponse::platformLazyInit()
     m_mimeType = [m_nsResponse.get() MIMEType];
     m_expectedContentLength = [m_nsResponse.get() expectedContentLength];
     m_textEncodingName = [m_nsResponse.get() textEncodingName];
+
+    // Workaround for <rdar://problem/8757088>, can be removed once that is fixed.
+    unsigned textEncodingNameLength = m_textEncodingName.length();
+    if (textEncodingNameLength >= 2 && m_textEncodingName[0] == '"' && m_textEncodingName[textEncodingNameLength - 1] == '"')
+        m_textEncodingName = m_textEncodingName.substring(1, textEncodingNameLength - 2);
+
     m_suggestedFilename = [m_nsResponse.get() suggestedFilename];
     
     if ([m_nsResponse.get() isKindOfClass:[NSHTTPURLResponse class]]) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list