<http://webkit.org/b/36878> REGRESSION: Trailing colon on hostnames (with no port...
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Apr 2010 00:13:37 +0000 (00:13 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Apr 2010 00:13:37 +0000 (00:13 +0000)
commit811838fafb1e70a715f53024a346252ff07cb284
tree6706ef0934f4b18ed0e4c2777479b5c12626bdf1
parent2e8dffc516f12e9a8d4137115fabe72c3b6d3e45
<webkit.org/b/36878> REGRESSION: Trailing colon on hostnames (with no port specified) causes "Not allowed to use restricted network port"

Reviewed by Darin Adler.

WebCore:

* platform/KURL.cpp:
(WebCore::KURL::port): Explicitly handle the case of a colon being present in the URL after the host name but with
no port number before the path.  This is handled in the same manner as the colon and port being omitted completely.

LayoutTests:

Add explicit tests for handling of allowed ports.  We currently only test the ports that map to port 80: 0, 80, and "".

* platform/mac/security/block-test-expected.txt:
* security/block-test.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@56879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/security/block-test-expected.txt
LayoutTests/security/block-test.html
WebCore/ChangeLog
WebCore/platform/KURL.cpp