redhat-developer / redhat-developer/vscode-xml

"Error while downloading ... to ..." caused by a malformed Accept HTTP header

Open
#938 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
328
Forks
101
Avg merge
1d 17h
Merged PRs (30d)
7

Description

Requests to an Apache HTTP server results in code 500 because of this OpenJDK bug (specifically caused by the *; q=.2 part). This prevents the extension to automatically download http://files.mcupdater.com/ServerPackv2.xsd. The complete error message is Error while downloading 'http://files.mcupdater.com/ServerPackv2.xsd' to '/home/user/.lemminx/cache/http/files.mcupdater.com/ServerPackv2.xsd' : '[java.io.IOException] Server returned HTTP response code: 500 for URL: http://files.mcupdater.com/ServerPackv2.xsd with code: 500 Internal Server Error'..

VSCode info:

Version: 1.81.1
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:18:39.991Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 5.15.0-86-generic

Extension info:

Name: XML
Id: redhat.vscode-xml
Description: XML Language Support by Red Hat
Version: 0.26.1
Publisher: Red Hat
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml

PS: I'm clueless about how VSCode extensions are packaged, so this might not be the right place to post this issue. Maybe this is a user-side issue that lies in the OpenJDK installed on the system. But it seems that the server/lemminx-linux binary embed the JVM.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failed download of http://files.mcupdater.com/ServerPackv2.xsd and inspect how the packaged server/lemminx-linux binary constructs its HTTP request. Check the embedded JVM and Accept header behavior against the linked OpenJDK bug. Done means the Apache request no longer returns HTTP 500 and the XSD downloads successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
networking, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.