[Webkit-unassigned] [Bug 169274] [link preload] Double downloads of preloaded CSS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 7 07:59:23 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=169274

--- Comment #4 from Yoav Weiss <yoav at yoav.ws> ---
(In reply to comment #3)
> Comment on attachment 303647 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=303647&action=review
> 
> > Source/WebCore/loader/cache/CachedResourceLoader.cpp:929
> > +    if (textDecoder && !textDecoder->hasEqualEncodingForCharset(cachedResourceRequest.charset())) {
> > +        if (!existingResource->isLinkPreload())
> > +            return Reload;
> > +        existingResource->setEncoding(cachedResourceRequest.charset());
> > +    }
> 
> What happens if there are multiple requests for the same link-preloaded
> resource with different charsets?
> 
> <link rel="preload" href="foo.js" as="script">
> ...
> <script src="foo.js" charset=utf-8></script>
> <script src="foo.js" charset=latin1></script>

I agree that in that case, we'll enforce two different encodings on the same resource, and that can result in us sending the wrongly decoded text to the second resource.

Maybe we also need to discard any cached decoded text in the related CachedResources?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170307/8802ff95/attachment-0001.html>


More information about the webkit-unassigned mailing list