Skip to content

env.asExternalUri escapes Uri query parameters #112383

@renkun-ken

Description

@renkun-ken
  • VSCode Version: 1.52.0
  • OS Version: macOS 11.0.1

I need to forward a port from remote to client according to https://code.visualstudio.com/api/advanced-topics/remote-extensions#forwarding-localhost. If the Uri contains query parameters, the query string is escaped so that = becomes %3D.

Steps to Reproduce:

vscode.env.asExternalUri(Uri.parse("http://127.0.0.1:57801/live?token=PUfsI2ka"))

returns

http://127.0.0.1:57801/live?token%3DPUfsI2ka

I'm not sure if it is intentional but the resulting Uri will not work unless I decode this Uri. The introduction at https://code.visualstudio.com/api/advanced-topics/remote-extensions#callbacks-and-uri-handlers does not seem to say anything about this escaping?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions