Summary: | Web Inspector: XHR with text but responseType = "blob" shows blank content | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bburg, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Joseph Pecoraro
2016-08-30 20:56:03 PDT
Created attachment 287478 [details]
[PATCH] Proposed Fix
We should really clean up our XHR <-> Inspector code. We may want to start sharing some of it with Fetch.
Comment on attachment 287478 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=287478&action=review r=me So the bug is that we try to send gibberish decoded text instead of letting the inspector autodetect it or what? The changelog didn't really explain why this fix makes the frontend do anything different. > LayoutTests/inspector/network/xhr-json-blob-has-content.html:33 > + resource.singleFireEventListener(WebInspector.Resource.Event.LoadingDidFinish, (event) => { The nesting here is getting excessive for my taste. I filed https://bugs.webkit.org/show_bug.cgi?id=161451 which could help. > LayoutTests/inspector/network/xhr-json-blob-has-content.html:37 > + resolve(); I think it would be cleaner to remove this resolve(), then have .then(resolve, reject) or .then(resolve).catch(reject) at the end > LayoutTests/inspector/network/xhr-json-blob-has-content.html:57 > + resolve(); > + }, reject); Ditto (In reply to comment #3) > Comment on attachment 287478 [details] > [PATCH] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=287478&action=review > > r=me > > So the bug is that we try to send gibberish decoded text instead of letting > the inspector autodetect it or what? The changelog didn't really explain why > this fix makes the frontend do anything different. Somehow this got lost in my ChangeLog. Previously we were overwriting the content with an empty string. Now we don't. |