Expose an interface to provide a fake response object
Categories
(Core :: Networking, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
(Whiteboard: [webdriver:m11][necko-triaged])
Attachments
(2 files)
The network.provideResponse command of WebDriver BiDi allows clients to specify the response of a request intercepted before it was sent to the server.
Clients can set the following properties: headers (+ cookies), status, status message and response body.
In that case, the request should not hit the network, we want to build a fake response using the information provided by the client.
Also, we are not concerned with performing security checks or providing accurate timings in such a scenario.
Discussing with :valentin, one option is to expose an interface so that the BiDi codebase can set an xpcom object which encapsulates the fake response. Once this is set and the request is resumed, before connecting we will check the override, send out OnStart/onData/onStop and then cleanup the channel.
At the moment this should happen for requests blocked in http-on-before-connect, but ultimately we would like to use http-on-dispatching-transaction (Bug 1849686).
Assignee | ||
Comment 1•6 months ago
|
||
Assignee | ||
Comment 2•6 months ago
|
||
Depends on D213399
Assignee | ||
Updated•5 months ago
|
Comment 4•5 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/750ee4b0609f
https://hg.mozilla.org/mozilla-central/rev/7889072db20c
Description
•