Skip to content
Permalink
Browse files
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.


Canonical link: https://commits.webkit.org/169456@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
anttijk committed Nov 15, 2015
1 parent 6ba998a commit b274799dcb2bd1c6d5bd8e7fe4b288a6401700c7
Showing with 22 additions and 1 deletion.
  1. +16 −0 Source/WebCore/ChangeLog
  2. +6 −1 Source/WebCore/loader/DocumentLoader.cpp
@@ -1,3 +1,19 @@
2015-11-14 Antti Koivisto <antti@apple.com>

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.

2015-11-14 Nan Wang <n_wang@apple.com>

AX: add a new trait for elements in fieldset on iOS
@@ -727,7 +727,12 @@ void DocumentLoader::continueAfterContentPolicy(PolicyAction policy)
// When starting the request, we didn't know that it would result in download and not navigation. Now we know that main document URL didn't change.
// Download may use this knowledge for purposes unrelated to cookies, notably for setting file quarantine data.
frameLoader()->setOriginalURLForDownloadRequest(m_request);
frameLoader()->client().convertMainResourceLoadToDownload(this, m_request, m_response);

if (m_request.url().protocolIsData()) {
// We decode data URL internally, there is no resource load to convert.
frameLoader()->client().startDownload(m_request);
} else
frameLoader()->client().convertMainResourceLoadToDownload(this, m_request, m_response);

// It might have gone missing
if (mainResourceLoader())

0 comments on commit b274799

Please sign in to comment.