Describe the bug
The documentation explains how you can intercept and modify a response. This way of modifying the response correctly sends only 1 request to the server but the HAR file contains 2 entries for the same URL. It seems that the first HAR entry is for the original request (which never gets sent) and the second is for the fetch. This causes the correct request and expected response information to be split between the 2 har entries; use the code snippet above and look at the request & response inject-headers in the HAR data. I don't know what the correct behaviour should be but I doubt there should be 2 complete har entries per single network request.
This is working as intended. You see one request that actually hit the network and the one that was sent by the page and fulfilled via interception, the latter has pageref the former doesn't.
Context:
Code Snippet
Describe the bug The documentation explains how you can intercept and modify a response. This way of modifying the response correctly sends only 1 request to the server but the HAR file contains 2 entries for the same URL. It seems that the first HAR entry is for the original request (which never gets sent) and the second is for the fetch. This causes the correct request and expected response information to be split between the 2 har entries; use the code snippet above and look at the request & response
inject-headers
in the HAR data. I don't know what the correct behaviour should be but I doubt there should be 2 complete har entries per single network request.