Bug 190505
| Summary: | Web Inspector: preserve showing the Request/Response when switching between network entries | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Devin Rousso <hi> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ap, hi, inspector-bugzilla-changes, jamaln, nathanjoe755 |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | All | ||
| OS: | All | ||
Devin Rousso
* STEPS TO REPRODUCE:
1. Open WebInspector on any page
2. Go to the Network tab
3. Select a resource that has a request payload (e.g. JSON sent with the request)
4. Show the "Request" content under "Preview"
5. Fire another request on the page
6. Select the newly added resource (it must also have a request payload)
=> "Response" content shown for the second resource instead of "Request"
Example request:
fetch("data.json?" + Math.random(), {
method: "POST",
// headers: {"Content-Type": "application/json"},
body: `{"a":1,"b":2,"c":3,"d":4,"e":5,"f":6}`,
});
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Devin Rousso
As it turns out, this does work (mostly) as you'd expect. The "Request"/"Response"/"JSON" choice is preserved per URL, but it is not preserved across URLs, meaning adding `Math.random()` to the end of the URL will cause each request to be given a different setting. If you run the example in comment 0, but without the `Math.random`, it should work as expected. Selecting to a network entry with a different URL, however, will not.
There's actually a FIXME in `WI.ResourceClusterContentView` about this exact issue.