Simplify NetworkObserver handling of response cookies and headers
Categories
(DevTools :: Netmonitor, task)
Tracking
(firefox109 fixed)
| Tracking | Status | |
|---|---|---|
| firefox109 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
At the moment, response cookies and headers are a shared responsibility between NetworkObserver and NetworkResponseListener, and require a lot of boilerplate to work.
First of all we have the #openResponses property of NetworkObserver which is a ChannelMap instance containing "response" objects. Those "response" seem to contain a lot of information (id, channel, httpVersion, status, statusText, cookies and headers) but only cookies and headers are actually used. So we could simplify the object.
Then the main issue is that #openResponses are owned and filled by NetworkObserver, but the NetworkResponseListener is responsible for reading it and notifying the consumer about potential response cookies and headers. Ideally, we should move that responsibility back to NetworkObserver, it's not clear why we can't simply notify consumers when we collect the response cookies and headers, which consistently happens in NetworkObserver:#httpResponseExaminer
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
Depends on D162205
| Assignee | ||
Comment 2•3 years ago
|
||
Depends on D162206
Comment 4•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/05df30e6f7e9
https://hg.mozilla.org/mozilla-central/rev/a548d0e36104
Description
•