-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Open
Labels
33-x-y34-x-ybug 🪲component/webRequesthas-repro-gistIssue can be reproduced with code at https://gist.github.com/Issue can be reproduced with code at https://gist.github.com/platform/windows
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
34.0.0
What operating system(s) are you using?
Windows
Operating System Version
Windows 10
What arch are you using?
x64
Last Known Working Electron version
14.2.9
Expected Behavior
All requests that are handled with onHeadersReceived should show modified headers (if they are being modified in the handler)
Actual Behavior
Some requests do not show the modified headers.
Example:
electron.session.defaultSession.webRequest.onHeadersReceived((details, callback) => {
console.log(details.url, details.responseHeaders);
if (details.responseHeaders) {
details.responseHeaders["test"] = ["1"];
}
callback({cancel: false, responseHeaders: details.responseHeaders});
});
I am setting a "test" header to each request
Navigating to google.com does not show the header in the first request:
It does appear in the second request though
Testcase Gist URL
https://gist.github.com/t57ser/b97184b3c8772a8ccf7cb600ceac1202
Additional Information
No response
Metadata
Metadata
Assignees
Labels
33-x-y34-x-ybug 🪲component/webRequesthas-repro-gistIssue can be reproduced with code at https://gist.github.com/Issue can be reproduced with code at https://gist.github.com/platform/windows