RESOLVED FIXED Bug 54085
Web Inspector: Network & Resource panels make multiple requests for images with co content
https://bugs.webkit.org/show_bug.cgi?id=54085
Summary Web Inspector: Network & Resource panels make multiple requests for images wi...
Andrey Kosyakov
Reported 2011-02-09 02:58:44 PST
Run following snippet with DevTools opened. <script> function doStuff() { var r = Math.floor(Math.random()*100000); var i = new Image(); i.src = 'http://www.facebook.com/ajax/hovercard/shown.php?'+r; } </script> <button onclick="doStuff()">do stuff</button> Observe preview image source in the Network/Resources panels. Expected: data URL, no network requests Actual: original URL, additional network request is being made Original bug report: http://code.google.com/p/chromium/issues/detail?id=72402
Attachments
patch (2.38 KB, patch)
2011-02-09 07:06 PST, Andrey Kosyakov
pfeldman: review-
pfeldman: commit-queue-
patch (6.38 KB, patch)
2011-02-09 09:05 PST, Andrey Kosyakov
pfeldman: review+
pfeldman: commit-queue-
Andrey Kosyakov
Comment 1 2011-02-09 07:06:30 PST
Pavel Feldman
Comment 2 2011-02-09 07:17:28 PST
Comment on attachment 81806 [details] patch I don't think this is a reliable solution. We might be not accurate wrt resource size, why should we make content request depend on potential resource size inconsistencies.
Andrey Kosyakov
Comment 3 2011-02-09 09:05:42 PST
Created attachment 81818 [details] patch - check resource size on back-end, return "" for 0-sized resources, NULL for errors
WebKit Review Bot
Comment 4 2011-02-09 09:08:52 PST
Attachment 81818 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/inspector/InspectorResourceAgent.cpp:127: Use 0 instead of NULL. [readability/null] [4] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Pavel Feldman
Comment 5 2011-02-09 09:37:48 PST
Comment on attachment 81818 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=81818&action=review > Source/WebCore/inspector/Inspector.idl:103 > + [domain=Network] void resourceContent(in unsigned long frameId, in String url, in boolean base64Encode, out boolean foundResource, out String content); foundResource -> success > Source/WebCore/inspector/InspectorResourceAgent.cpp:506 > +void InspectorResourceAgent::resourceContent(unsigned long id, const String& url, bool base64Encode, bool* resourceFound, String* content) frameId?
Andrey Kosyakov
Comment 6 2011-02-10 05:00:07 PST
Note You need to log in before you can comment on or make changes to this bug.