Changeset 24484 in webkit


Ignore:
Timestamp:
Jul 20, 2007 11:37:09 AM (17 years ago)
Author:
darin
Message:

LayoutTests:

Reviewed by John Sullivan.

  • test for <rdar://problem/5331723> <rdar://problem/5331723> Safari gives error 103 for URLs that Adobe Lightroom's Preview feature produces, with ":1" in the hostname
  • fast/loader/file-URL-with-port-number-expected.txt: Added.
  • fast/loader/file-URL-with-port-number.html: Added.
  • fast/loader/resources/empty-subframe.html: Added.

WebCore:

Reviewed by John Sullivan.

  • fix for <rdar://problem/5331723> <rdar://problem/5331723> Safari gives error 103 for URLs that Adobe Lightroom's Preview feature produces, with ":1" in the hostname

Test: fast/loader/file-URL-with-port-number.html

  • platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed): Don't do any port blocking for file URLs.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r24480 r24484  
     12007-07-20  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by John Sullivan.
     4
     5        - test for <rdar://problem/5331723> <rdar://problem/5331723> Safari gives error
     6          103 for URLs that Adobe Lightroom's Preview feature produces, with ":1" in the hostname
     7
     8        * fast/loader/file-URL-with-port-number-expected.txt: Added.
     9        * fast/loader/file-URL-with-port-number.html: Added.
     10        * fast/loader/resources/empty-subframe.html: Added.
     11
    1122007-07-20  Rob Buis  <buis@kde.org>
    213
  • trunk/WebCore/ChangeLog

    r24481 r24484  
     12007-07-20  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by John Sullivan.
     4
     5        - fix for <rdar://problem/5331723> <rdar://problem/5331723> Safari gives error
     6          103 for URLs that Adobe Lightroom's Preview feature produces, with ":1" in the hostname
     7
     8        Test: fast/loader/file-URL-with-port-number.html
     9
     10        * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed):
     11        Don't do any port blocking for file URLs.
     12
    1132007-07-20  Mitz Pettel  <mitz@webkit.org>
    214
  • trunk/WebCore/platform/network/ResourceHandle.cpp

    r24202 r24484  
    162162        + sizeof(blockedPortList) / sizeof(blockedPortList[0]);
    163163
     164    // If the port is not in the blocked port list, allow it.
     165    if (!std::binary_search(blockedPortList, blockedPortListEnd, port))
     166        return true;
     167
    164168    // Allow ports 21 and 22 for FTP URLs, as Mozilla does.
    165     return !std::binary_search(blockedPortList, blockedPortListEnd, port)
    166         || ((port == 21 || port == 22) && request.url().url().startsWith("ftp:", false));
     169    if ((port == 21 || port == 22) && request.url().url().startsWith("ftp:", false))
     170        return true;
     171
     172    // Allow any port number in a file URL, since the port number is ignored.
     173    if (request.url().url().startsWith("file:", false))
     174        return true;
     175
     176    return false;
    167177}
    168178 
Note: See TracChangeset for help on using the changeset viewer.