LayoutTests:
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Feb 2007 10:38:05 +0000 (10:38 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Feb 2007 10:38:05 +0000 (10:38 +0000)
commita6b555bd0903ff271dc6d329bca8bc3cefff8221
tree4c99913bd09b54fbe1401331907704ebc46af4c6
parent71f73dd4b59a55a26dd065616992c72884a125f4
LayoutTests:

        Reviewed by Maciej

        <rdar://problem/4965133> WebKit sends file:// url referrers

        Added a new category of http tests - "local" where the test is run as a local file but
        the test involves remote resources from the httpd.
        This test had to be done with cached subresources to tickle the code path that was failing before,
        hence the bizarre different-sized images instead of simple success/failure text

        * http/tests/local/file-url-sent-as-referer-expected.txt: Added.
        * http/tests/local/file-url-sent-as-referer.html: Added - document.writes an img source
          that ends up testing the http-referer

        * http/tests/security/resources/green250x50.png: Added.
        * http/tests/security/resources/red200x100.png: Added.

        * http/tests/security/resources/showRefererImage.php: Added - By scanning the referrer,
          sends back either the success or failure image

WebCore:

        Reviewed by Maciej

        <rdar://problem/4965133> WebKit sends file:// url referrers

        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::create): In SubresourceLoader::create(), we make a copy of the original request
        to use for the load.  We then call FrameLoader::canLoad() which tells us if we should hide the referer.  Before
        this fix if it said to hide the referrer, we would simply not apply a new referrer to our copy of the request.
        But if the original request already had a referrer, so did our copy.  We simply have to clear the referrer from
        the copied request.

WebKitTools:

        Reviewed by Maciej

        <rdar://problem/4965133> WebKit sends file:// url referrers

        * Scripts/run-webkit-tests: Enhanced the http tests so that we can run layout tests
          on local files, but have an httpd for remote resources

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/local/file-url-sent-as-referer-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/local/file-url-sent-as-referer.html [new file with mode: 0644]
LayoutTests/http/tests/security/resources/green250x50.png [new file with mode: 0644]
LayoutTests/http/tests/security/resources/red200x100.png [new file with mode: 0644]
LayoutTests/http/tests/security/resources/showRefererImage.php [new file with mode: 0644]
WebCore/ChangeLog
WebCore/loader/SubresourceLoader.cpp
WebCore/platform/network/ResourceRequest.h
WebKitTools/ChangeLog
WebKitTools/Scripts/run-webkit-tests