Reviewed by Darin Adler.
authorap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Jan 2009 09:39:19 +0000 (09:39 +0000)
committerap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Jan 2009 09:39:19 +0000 (09:39 +0000)
commit6e07be01be7949bb69b601b71c5817dc0e5b6f1e
treec70c825fefaa0381da0dace93d3d2c4e26e43abf
parentbf19db71a6c5341c6379bb3b6463adf1f1c31eef
    Reviewed by Darin Adler.

        <rdar://problem/6368059> REGRESSION: URL encoding problems on http://www.cineman.ch

        Test: http/tests/xmlhttprequest/encode-request-url-2.html

        * platform/KURL.cpp:
        (WebCore::appendASCII): Added a helper function.
        (WebCore::KURL::KURL): Explicitly encode the URL to call two-argument parse() with better
        specified behavior.
        (WebCore::KURL::init): Ditto. This avoids trying to round-trip an URL encoded into a byte
        stream, but not yet transformed to ASCII-only using percent escapes. Since different parts
        of the byte stream can use different encodings, round-tripping is not possible.
        (WebCore::KURL::parse): Reverted an earlier change that made the single-argument version of
        this function convert the string to utf-8. I think that on the remanining code paths, it is
        correct to assume that the string is all ASCII, but I'm not yet confident enough to drop a
        FIXME warning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@40213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/loader/url-parse-1-expected.txt
LayoutTests/http/tests/xmlhttprequest/encode-request-url-2-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/encode-request-url-2.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/platform/KURL.cpp
WebCore/platform/KURL.h