-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
vscode-resource domain name has '+' in domain name, which is illegal domain name #163225
Comments
Seems like a valid url to me: // Doesn't throw
new URL('https://file+.vscode-resource.vscode-cdn.net') And I don't see it in the forbidden code points for hosts: https://url.spec.whatwg.org/#host-miscellaneous Are you sure it's not just a problem with the framework you are using? |
RFC 1178 - Choosing a Name for Your Computer says:
RFC1035 - Domain names - implementation and specification says:
C#/WebAssembly runs into problems too: The following exception is thrown:
(also happens if we replace the '+' with '%2B') |
These are valid uris afaik. They may not be valid internet host names, but that's not relevant for how VS Code uses them. Plus here is an important delimiter for information that we encode in the uri, so it is also not possible for us to easily switch to names that only use a-z and numbers as you suggest Can you workaround the issue by not parsing these uris? |
The web framework (blazor) includes support for navigation so it needs the base url. A blazor app cannot run without trying to create that uri. You have several issues asking for support of blazor written webviews. Could you more easily replace '+' with '-'? |
Good question about valid URIs. From above
I would imagine, that could be rewritten as... Below, you'll see that the URI spec allows a +, but also says it depends on the name lookup technology that will be used. Using a domain name, like you are, seems like DNS system would be used. If so they specific a syntax without those subdelimiters in the hostname: RFC3986 - Uniform Resource Identifier (URI): Generic Syntax
|
This sounds like a framework specific problem so without a compelling, simple, and complete suggestion on how to fix this, this is not something we are going to change in VS Code The host you are seeing is constructed as |
Will continue to look at your encoding of scheme+authority here to come up with good options: Will also reach out to colleagues from dotnet, blazor, etc... to understand options in other components, etc. |
Currently investigating 'SCHEME.AUTHORITY' instead of 'SCHEME+AUTHORITY' Since AUTHORITY could be blank, we would need a well known string that serves as "NO-AUTHORITY". Update: the period delimiter solution appears to work well. Unblocked me for now with private build. Will try to finalize fix and submit as PR for consideration in the next couple of weeks. |
In this fork: https://github.com/rrelyea/vscode, I have fixes in 5 files for this, so far. It appears to work well. Reasonable for me to spend time running all tests and submitting a PR? |
@rrelyea Yep sounds good. Thanks for taking a look! For testing, besides testing a local workspace try a remote workspach such as ssh, wsl, or contains. These should load resources from a virtual filesystem with an authority (whereas |
@rrelyea What become of this? Was it ever submitted as a PR? We have a similar issue Azure/bicep#11467. Thx |
Never submitted as PR. Ended up not being a blocking issue for me. |
Were you able to get this working in wasm without a custom VS Code build? Thanks. |
Been a long time, so I don't recall. You could look here: https://github.com/[rrelyea/vscode-webview-blazor](https://github.com/rrelyea/vscode-webview-blazor) |
Type: Bug
Attempting to get a webview extension going, where the hosted web framework attempts to create a URI object based on the base url of the extension. Because it appears like the URL starts with:
"https://file+.vscode-resource.vscode-cdn.net"
The scenario fails. And the web framework throws an exception during its startup.
It doesn't appear that I have a workaround.
Can VSCode please be changed to use a valid domain name?
VS Code version: Code 1.72.0 (64bbfbf, 2022-10-04T23:20:39.912Z)
OS version: Windows_NT x64 10.0.22623
Modes:
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Extensions (21)
The text was updated successfully, but these errors were encountered: