Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: URL did not change after 302 response using protocol handler #42219

Open
3 tasks done
shadaxv opened this issue May 17, 2024 · 1 comment
Open
3 tasks done

[Bug]: URL did not change after 302 response using protocol handler #42219

shadaxv opened this issue May 17, 2024 · 1 comment
Labels
30-x-y 31-x-y bug 🪲 component/protocol has-repro-gist Issue can be reproduced with code at https://gist.github.com/ status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@shadaxv
Copy link

shadaxv commented May 17, 2024

Preflight Checklist

Electron Version

30.0.6

What operating system are you using?

Windows

Operating System Version

Windows 10 22H2 19045.4291

What arch are you using?

x64

Last Known Working Electron version

Unknown

Expected Behavior

When using http/https protocol.handle with net.fetch in Electron and the server returns a 302 status code with a new Location header, although Electron accurately shows the correct header and status code in the onHeadersReceived and onBeforeRedirect events, it returns a 200 status code to the browser and the URL is not changed.

The browser should be redirected to https://www.google.com, and the status code should be 302.

Actual Behavior

The browser returns a 200 status code, and the URL is not changed, but the content from the new page is displayed

Testcase Gist URL

https://gist.github.com/shadaxv/fe1242885053bdf4ed6a27c9ecc97049

Additional Information

No response

@electron-issue-triage electron-issue-triage bot added 30-x-y has-repro-gist Issue can be reproduced with code at https://gist.github.com/ labels May 17, 2024
@clavin clavin added component/protocol status/confirmed A maintainer reproduced the bug or agreed with the feature 31-x-y labels May 21, 2024
@MattChowski
Copy link

Been having this issue as well... we devised workarounds that work but still, I believe this should have been handled properly directly. Bumping up for visibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
30-x-y 31-x-y bug 🪲 component/protocol has-repro-gist Issue can be reproduced with code at https://gist.github.com/ status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
Status: 👍 Does Not Block Stable
Status: 👍 Does Not Block Stable
Development

No branches or pull requests

3 participants