Allow filename suggestions via a[download] for data URIs
Currently filename suggestions specified via a[download] are only honored if the interface origin is allowed to read content retrieved from the target resource origin. An embedder may enforce additional restrictions such as only honoring the suggested name if there are no cross-origin redirects encountered while fetching the resource. The suggested filename determination algorithm at http://www.w3.org/TR/html5/links.html#downloading-resources allows an exception for data URIs. They should be considered same-origin as the interface. This isn't currently the case since the origin of a data URI is considerd to be unique and is not same-origin with anything since they lack a server-based naming authority. This CL implements the exception for data URIs so that they are considered same-origin as their containing document for the purpose of handling the suggested filename for a[download]. BUG=373182 Review URL: https://codereview.chromium.org/300543002 git-svn-id: svn://svn.chromium.org/blink/trunk@176085 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment