vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Wrong encoding of JSON schema URL

Open dezsenyi opened this issue 10 months ago • 1 comments

Type: Bug

I configured a JSON schema in the json.schemas settings element: { "fileMatch": ["associations.config*.json"], "url": "file:///c:/ELOprofessional/config/json-schema/associations.config.schema.json" } This works well. I replaced the "url" paramter with the following: { "fileMatch": ["associations.config*.json"], "url": "https://ikmaster.ovitashu.local:9093/ix-elo/ix?cmd\=readdoc1&downloadid=(9CF9004A-DC3C-746A-97F5-7960CF3BDE0D)&fname=associations.config.schema.json" } The URL is correct above, I can open it in a browser. However VS cannot open it, I got the following error message in the terminal:

Unable to load schema from 'https://ikmaster.ovitashu.local:9093/ix-elo/ix?cmd=readdoc1&downloadid=(9CF9004A-DC3C-746A-97F5-7960CF3BDE0D)&fname=associations.config.schema.json': Not Found. The requested location could not be found.

I checked at the server side and the problem is that VS sends bad URL, it encodes the = and & characters, which is a problem, because these are important separator characters of the GET parameters.

This is the URL that VS sends (Tomcat localhost access LOG file):

192.168.190.64 - - [13/Feb/2025:08:21:56 +0100] "GET /ix-elo/ix?cmd%3Dreaddoc1%26downloadid%3D%289CF9004A-DC3C-746A-97F5-7960CF3BDE0D%29%26fname%3Dassociations.config.schema.json HTTP/1.1" 404 121

And this is the how it looks like when I open it from a browser:

192.168.190.64 - - [13/Feb/2025:08:21:44 +0100] "GET /ix-elo/ix?cmd=readdoc1&downloadid=(9CF9004A-DC3C-746A-97F5-7960CF3BDE0D)&fname=associations.config.schema.json HTTP/1.1" 200 79828

So, it seems clearly for me as a bug. Thank you for your help!

Kind regards, Csaba D.

VS Code version: Code 1.97.1 (e249dada235c2083c83813bd65b7f4707fb97b76, 2025-02-10T13:13:58.153Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) Ultra 7 165U (14 x 2688)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.46GB (8.24GB free)
Process Argv --crash-reporter-id 364df494-aa35-4fb4-9846-2c404d9d89eb
Screen Reader no
VM 0%
Extensions (3)
Extension Author (truncated) Version
jslint ajh 1.2.1
vscode-eslint dba 3.0.10
vscode-gradle vsc 3.16.4
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
dwoutputscf:31233691
8did9651:31230678
9064b325:31222308
copilot_t_ci:31222730
cp15172_c:31236637
jda6j935:31233686

dezsenyi avatar Feb 13 '25 12:02 dezsenyi