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
can't update url protocol when old protocol include '+' #39732
Comments
The behavior is correct according to the URL spec: https://url.spec.whatwg.org/#ref-for-scheme-state
Because |
but Firefox, edge, chrome all support change it from |
If they all support it, it's probably worth opening an issue in the spec repo: https://github.com/whatwg/url/issues /cc @TimothyGu |
another issue is |
I agree with @targos. This is the correct behavior. URL spec mentions that in If url’s scheme is a special scheme and buffer is not a special scheme, then return.
@bluelovers Origin definition in the URL spec states that, if the scheme is not special or not blob, it will always return a new opaque origin (which is I'm closing this issue. Please open a new issue, if you think there is a misinterpretation of the spec. |
Version
v16.6.1
Platform
windows 10 x64
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
100%
What is the expected behavior?
u.protocol = 'http:'
What do you see instead?
u.protocol = 'git+https:'
Additional information
in google chrome it can be update
https://stackoverflow.com/questions/68738015/why-cant-update-url-protocol-when-old-protocol-include-in-nodejs
The text was updated successfully, but these errors were encountered: