Closed Bug 1893117 Opened 3 months ago Closed 3 months ago

Introduce NetworkRequest and NetworkResponse classes

Categories

(Remote Protocol :: WebDriver BiDi, task, P2)

task
Points:
3

Tracking

(firefox127 fixed)

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [webdriver:m11])

Attachments

(1 file)

As we start to allow to modify requests for network interception, we should change a bit the way we retrieve details about the request and response.

Initially the approach was very close to DevTools, which is reading the data only once and then reusing it during the lifecycle of the event. But in our case, if a client modifies the request headers in beforeRequestSent, the request.headers should be updated accordingly in the later events (eg network.responseStarted).

In order to do that, we can introduce Request and Response classes which will be closer to what the spec is expecting. For instance, in the spec, for each event we get the headers from the request, so following this approach should make it easier to avoid stale data in our events.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6b362047d27c
[remote] Introduce NetworkRequest and NetworkResponse classes r=webdriver-reviewers,Sasha
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Blocks: 1893608
Points: --- → 3
Priority: -- → P2
Whiteboard: [webdriver:m11]
No longer blocks: 1893608
Regressions: 1893608
You need to log in before you can comment on or make changes to this bug.