#52113: fix: use the registering session for ProtocolResponse.url requests
Merged
Created: Jun 24, 2026, 4:35:32 PM
Merged: Jun 25, 2026, 4:07:04 PM
7 comments
Target: main
Description of Change
ProtocolResponse.session is documented as:
By default the HTTP request will reuse the current session.
In practice, when session was omitted the upstream request was always
made through session.defaultSession, regardless of which session the
protocol handler was registered on. Thread the registering browser
context through ElectronURLLoaderFactory so the upstream request
defaults to the handler's own session, as documented.
Checklist
- PR description included and stakeholders cc'd
-
npm testpasses - tests are changed or added
- PR title follows semantic commit guidelines
Release Notes
Notes: Fixed ProtocolResponse.url requests being made through the default session instead of the session the protocol handler was registered on when ProtocolResponse.session was not set.
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron