Commit 0dc530da authored by Pavel Feldman's avatar Pavel Feldman Committed by Commit Bot

DevTools: do not fall back to image request re-issue for no-cache requests.

Bug: 816688
Change-Id: I29beeae9ce49169204ec867cc9636b00a360a26a
Reviewed-on: https://chromium-review.googlesource.com/941980Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540722}
parent da8c644e
......@@ -1032,11 +1032,11 @@ SDK.NetworkRequest = class extends Common.Object {
*/
function onResourceContent(content) {
let imageSrc = Common.ContentProvider.contentAsDataURL(content, this._mimeType, true);
if (imageSrc === null)
const cacheControl = this.responseHeaderValue('cache-control');
if (imageSrc === null && (!cacheControl || !cacheControl.includes('no-cache')))
imageSrc = this._url;
image.src = imageSrc;
}
this.requestContent().then(onResourceContent.bind(this));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment