Changeset 30781 in webkit


Ignore:
Timestamp:
Mar 4, 2008 6:09:04 PM (16 years ago)
Author:
mitz@apple.com
Message:

WebCore:

Reviewed by Darin Adler.

Test: fast/encoding/url-host-name-non-ascii.html

  • platform/KURL.cpp: (WebCore::appendEncodedHostname): Added an early return in the all-ASCII case to avoid copying the host name twice and corrected the error checking after calling uidna_IDNToASCII().

LayoutTests:

  • fast/encoding/url-host-name-non-ascii-expected.txt: Added.
  • fast/encoding/url-host-name-non-ascii.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r30777 r30781  
     12008-03-04  Dan Bernstein  <mitz@apple.com>
     2
     3        - test for http://bugs.webkit.org/show_bug.cgi?id=17676
     4          <rdar://problem/5781091> REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work
     5
     6        * fast/encoding/url-host-name-non-ascii-expected.txt: Added.
     7        * fast/encoding/url-host-name-non-ascii.html: Added.
     8
    192008-03-04  Nikolas Zimmermann  <zimmermann@kde.org>
    210
  • trunk/WebCore/ChangeLog

    r30779 r30781  
     12008-03-04  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=17676
     6          <rdar://problem/5781091> REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work
     7
     8        Test: fast/encoding/url-host-name-non-ascii.html
     9
     10        * platform/KURL.cpp:
     11        (WebCore::appendEncodedHostname): Added an early return in the all-ASCII
     12        case to avoid copying the host name twice and corrected the error
     13        checking after calling uidna_IDNToASCII().
     14
    1152008-03-04  Sam Weinig  <sam@webkit.org>
    216
  • trunk/WebCore/platform/KURL.cpp

    r30564 r30781  
    13251325    const unsigned hostnameBufferLength = 2048;
    13261326
    1327     if (strLen > hostnameBufferLength || charactersAreAllASCII(str, strLen))
     1327    if (strLen > hostnameBufferLength || charactersAreAllASCII(str, strLen)) {
    13281328        buffer.append(str, strLen);
     1329        return;
     1330    }
    13291331
    13301332#if USE(ICU_UNICODE)
     
    13331335    int32_t numCharactersConverted = uidna_IDNToASCII(str, strLen, hostnameBuffer,
    13341336        hostnameBufferLength, UIDNA_ALLOW_UNASSIGNED, 0, &error);
    1335     if (error != U_ZERO_ERROR)
     1337    if (error == U_ZERO_ERROR)
    13361338        buffer.append(hostnameBuffer, numCharactersConverted);
    13371339#elif USE(QT4_UNICODE)
Note: See TracChangeset for help on using the changeset viewer.