Changeset 192458 in webkit


Ignore:
Timestamp:
Nov 14, 2015 9:23:08 PM (8 years ago)
Author:
Antti Koivisto
Message:

Regression(r188820): Downloads of data URLs is broken
https://bugs.webkit.org/show_bug.cgi?id=150900
rdar://problem/23399223

Reviewed by Darin Adler.

No test, the current test infrastructure only allows testing policy decisions, not the actual download.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::continueAfterContentPolicy):

Use normal download path for data URLs instead of trying to convert the main resource load.
Since we decode data URLs locally there is no associated resource load on WebKit side.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r192456 r192458  
     12015-11-14  Antti Koivisto  <antti@apple.com>
     2
     3        Regression(r188820): Downloads of data URLs is broken
     4        https://bugs.webkit.org/show_bug.cgi?id=150900
     5        rdar://problem/23399223
     6
     7        Reviewed by Darin Adler.
     8
     9        No test, the current test infrastructure only allows testing policy decisions, not the actual download.
     10
     11        * loader/DocumentLoader.cpp:
     12        (WebCore::DocumentLoader::continueAfterContentPolicy):
     13
     14        Use normal download path for data URLs instead of trying to convert the main resource load.
     15        Since we decode data URLs locally there is no associated resource load on WebKit side.
     16
    1172015-11-14  Nan Wang  <n_wang@apple.com>
    218
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r192342 r192458  
    728728        // Download may use this knowledge for purposes unrelated to cookies, notably for setting file quarantine data.
    729729        frameLoader()->setOriginalURLForDownloadRequest(m_request);
    730         frameLoader()->client().convertMainResourceLoadToDownload(this, m_request, m_response);
     730
     731        if (m_request.url().protocolIsData()) {
     732            // We decode data URL internally, there is no resource load to convert.
     733            frameLoader()->client().startDownload(m_request);
     734        } else
     735            frameLoader()->client().convertMainResourceLoadToDownload(this, m_request, m_response);
    731736
    732737        // It might have gone missing
Note: See TracChangeset for help on using the changeset viewer.