Closed
Bug 1298048
Opened 9 years ago
Closed 7 years ago
Webconsole.js skips requestHeaders and requestCookies updates
Categories
(DevTools :: Console, defect, P3)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: rickychien, Unassigned)
References
Details
updateBody() in net-request.js is not getting the requestHeaders and requestCookies updates.
Therefore, we decide to make a workaround at hasCookies() within net-info-body.js for enabling CookiesTab properly.
Following check at hasCookies() should be removed once this issue is addressed.
NetUtils.getHeaderValue(request.headers, "Cookie") ||
NetUtils.getHeaderValue(response.headers, "Set-Cookie");
| Reporter | ||
Comment 1•9 years ago
|
||
How to check:
Insert a console.log(response.updateType); in updateBody() method within net-info-body.js will see that "requestHeaders" and "requestCookies" never show up no matter what network details you expand on the web console.
Updated•9 years ago
|
Priority: -- → P3
Comment 2•9 years ago
|
||
What's going on:
- when a new NetworkEvent packet arrives, it's put into the console's output queue [1]
- only after the queue is flushed (every 20ms), the logNetEvent callback is called and it notifies the NetRequest [2]
- when a new NetworkEventUpdate arrives, NetRequest is notified only when _updateNetMessage returns true [3]
- that happens, however, only when the message node is already rendered [4]. In case where the initial NetworkEvent still waits in the queue, it's not yet rendered and NetRequest is not notified.
The results is that the first updates that came quickly enough (requestHeaders, requestCookies), are never seen by the netlogging code.
[1] http://searchfox.org/mozilla-central/source/devtools/client/webconsole/webconsole.js#1827
[2] http://searchfox.org/mozilla-central/source/devtools/client/webconsole/webconsole.js#1671
[3] http://searchfox.org/mozilla-central/source/devtools/client/webconsole/webconsole.js#1839
[4] http://searchfox.org/mozilla-central/source/devtools/client/webconsole/webconsole.js#1878
Updated•7 years ago
|
Product: Firefox → DevTools
Comment 3•7 years ago
|
||
old console frontend bug only, we now rely directly on netmonitor code.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•