Changeset 109783 in webkit


Ignore:
Timestamp:
Mar 5, 2012 12:28:18 PM (12 years ago)
Author:
rwlbuis@webkit.org
Message:

[BlackBerry] UTF chars printed back from cookie through php shows as ???
https://bugs.webkit.org/show_bug.cgi?id=80307

Reviewed by Antonio Gomes.

PR: 130055

we need to check the cookies encoding first and encode the cookie header data
to pass to the request.

  • platform/network/blackberry/NetworkManager.cpp:

(WebCore::NetworkManager::startJob):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109781 r109783  
     12012-03-05  Rob Buis  <rbuis@rim.com>
     2
     3        [BlackBerry] UTF chars printed back from cookie through php shows as ???
     4        https://bugs.webkit.org/show_bug.cgi?id=80307
     5
     6        Reviewed by Antonio Gomes.
     7
     8        PR: 130055
     9
     10        we need to check the cookies encoding first and encode the cookie header data
     11        to pass to the request.
     12
     13        * platform/network/blackberry/NetworkManager.cpp:
     14        (WebCore::NetworkManager::startJob):
     15
    1162012-03-05  Dana Jansens  <danakj@chromium.org>
    217
  • trunk/Source/WebCore/platform/network/blackberry/NetworkManager.cpp

    r109670 r109783  
    123123        String cookiePairs = cookieManager().getCookie(url, WithHttpOnlyCookies);
    124124        if (!cookiePairs.isEmpty()) {
    125             // We encode the cookie header data using utf8 to support unicode characters.
    126             // For more information, look at RFC5987 - 4.1 (http://tools.ietf.org/html/rfc5987#ref-ISO-8859-1).
    127             platformRequest.setCookieData(cookiePairs.utf8().data());
     125            // We need to check the encoding and encode the cookie header data using latin1 or utf8 to support unicode characters.
     126            platformRequest.setCookieData(cookiePairs.containsOnlyLatin1() ? cookiePairs.latin1().data() : cookiePairs.utf8().data());
    128127        }
    129128    }
Note: See TracChangeset for help on using the changeset viewer.