Reviewed by Sam
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2007 03:47:26 +0000 (03:47 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2007 03:47:26 +0000 (03:47 +0000)
commit12b0ac885d55c7634fde8339a4f967256013a93d
tree1cedc81577af28bf0bf51155c2256159dc43aa2f
parent5421d8524142560a371d250954dbca1a367e55a3
    Reviewed by Sam

        <rdar://problem/5134929> REGRESSION: Colon detected as delimiting an empty port is stripped

        The fix for this was in KURL::parse() which had a slightly changed rule that would strip the colon if there
        was no port.

        An additional canonicalization fix was made in window.location.host to match the expected behavior of leaving
        the colon in place - before this fix, if the colon was there but no port was there, we'd see the port as 0.

        * bindings/js/kjs_window.cpp:
        (KJS::Location::put): Call setHostAndPort instead of setHost and setPort seperately

        * manual-tests/location-host-canonicalization.html: Added.

        * platform/KURL.cpp:
        (WebCore::KURL::setHostAndPort): Set the host and port as one string component then reparse the URL
        (WebCore::KURL::parse): Change one line to consider the empty colon as part of the host name
        * platform/KURL.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/kjs_window.cpp
WebCore/manual-tests/location-host-canonicalization.html [new file with mode: 0644]
WebCore/platform/KURL.cpp
WebCore/platform/KURL.h