diff options
author | jww <jww@chromium.org> | 2016-01-06 12:16:19 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-06 20:17:35 +0000 |
commit | 271be402092404bd04b2881ec7301a8fe0c58964 (patch) | |
tree | 39e60fbd07d91e241f2022d1627f268d3985fe5d /base/base.gypi | |
parent | a8173e67dde8b046aa1a5c6eb719b6309c83c4eb (diff) | |
download | chromium_src-271be402092404bd04b2881ec7301a8fe0c58964.zip chromium_src-271be402092404bd04b2881ec7301a8fe0c58964.tar.gz chromium_src-271be402092404bd04b2881ec7301a8fe0c58964.tar.bz2 |
Fix double resource request for script resources with integrity attr.
Script tags with an integrity attribute were making two network requests
for the same resource for each tag. This would only happen if the script
tag appeared in the HTML of the page, but not if it was added
programmatically. This was because the preloader was requesting the
resource, but not checking the integrity attribute, and when the actual
request came around, it had to re-request the resource because of the
integrity metadata (see
https://chromium.googlesource.com/chromium/src/+/175dcb80d2d369bd7ce55b46d72971395c21a932
for a description of why this re-request for scripts is needed if there
is no integrity metadata on the first request).
Thus the solution to this is to check the integrity metadata in the
preloader. This adds a check in the preloader where, if the resource is
a script, it checks the integrity attribute and adds the appropriate
integrity metadata. When the script is requested for real later, the
returned resource now has the integrity metadata and no re-request is
needed.
BUG=573269
Review URL: https://codereview.chromium.org/1561903002
Cr-Commit-Position: refs/heads/master@{#367888}
Diffstat (limited to 'base/base.gypi')
0 files changed, 0 insertions, 0 deletions