Bug 213411

Summary: Web Inspector: do not report data on the rejected intercepted CORS request
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web InspectorAssignee: Pavel Feldman <pfeldman>
Status: NEW    
Severity: Normal CC: ews-watchlist, hi, inspector-bugzilla-changes, joepeck
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch hi: review+, pfeldman: commit-queue?

Pavel Feldman
Reported 2020-06-19 15:37:53 PDT
Resource can become disregarded right after the call to `didReceiveResponse`. Do not report received buffer and loading finished to such request.
Attachments
Patch (7.24 KB, patch)
2020-06-19 15:40 PDT, Pavel Feldman
hi: review+
pfeldman: commit-queue?
Pavel Feldman
Comment 1 2020-06-19 15:40:40 PDT
Devin Rousso
Comment 2 2020-06-22 17:46:04 PDT
Comment on attachment 402339 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402339&action=review r=me > Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:1295 > + return; Style: please add a newline after this `return` > LayoutTests/http/tests/inspector/network/intercept-cors-request.html:12 > + let response = await fetch("http://localhost:8000/data", { mode: "cors" }); Style: no space after `{` or before `}` when inlined > LayoutTests/http/tests/inspector/network/intercept-cors-request.html:15 > + return { error: e.message }; Ditto (:12) > LayoutTests/http/tests/inspector/network/intercept-cors-request.html:21 > + InspectorTest.debug(); oops > LayoutTests/http/tests/inspector/network/intercept-cors-request.html:58 > + name: "Network.interceptRequestWithResponse.CORS allow origin", NIT: we usually don't use spaces in test case names, preferring camel casing and periods. ``` name: "Network.interceptRequestWithResponse.CORS.Origin.Allow", ``` > LayoutTests/http/tests/inspector/network/intercept-cors-request.html:66 > + name: "Network.interceptRequestWithResponse.CORS disallow origin", Ditto (:58) ``` name: "Network.interceptRequestWithResponse.CORS.Origin.Disallow", ```
Note You need to log in before you can comment on or make changes to this bug.