Closed Bug 1552325 Opened 6 months ago Closed 5 months ago

Implement Network.requestWillBeSent

Categories

(Remote Protocol :: Network, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 69

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 3 open bugs)

Details

Attachments

(2 files)

Gutenberg tests:
packages/e2e-tests/specs/embedding.test.js
packages/e2e-tests/specs/change-detection.test.js

Are watching for requests and intercept them.
A very first step would be to implement a naive version of Network.requestWillBeSent and ``, before implementing Network.setRequestInterception and the related events

Here is an example of such event:

{"method":"Network.requestWillBeSent","params":{"requestId":"F931C3A196EED24B5886CF5D1842D29E","loaderId":"F931C3A196EED24B5886CF5D1842D29E","documentURL":"http://localhost:8889/wp-admin/post-new.php","request":{"url":"http://localhost:8889/wp-admin/post-new.php","method":"GET","headers":{"Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3494.0 Safari/537.36"},"mixedContentType":"none","initialPriority":"VeryHigh","referrerPolicy":"no-referrer-when-downgrade"},"timestamp":68261.693554,"wallTime":1558029756.27066,"initiator":{"type":"other"},"type":"Document","frameId":"A966F77A1F3A97FF8CEEAD72EFE9B104","hasUserGesture":false}}
Blocks: 1552326
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Priority: P2 → P1

requestWillBeSent is something stable between puppeteer 1.6 and current master.
Even the condition around requestId and loaderId is still relevant:
https://github.com/GoogleChrome/puppeteer/blob/6860d73212d2a36fd789a9244667be574f396164/lib/NetworkManager.js#L331

Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/912cd2e19760
Land juggler's network observer. r=remote-protocol-reviewers,ato
https://hg.mozilla.org/integration/autoland/rev/81fdadcd1a92
Implement Network.requestWillBeSent. r=remote-protocol-reviewers,ato
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
You need to log in before you can comment on or make changes to this bug.