Skip to content
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

v-analyzer up and v-analyzer check-updates fail with: "Invalid header key: 'Cache-Control'" #136

Open
skull-squadron opened this issue Oct 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@skull-squadron
Copy link

Describe the bug

cli execution error: Failed to download script: net.http.HeaderKeyError: Invalid header key: 'Cache-Control'

Expected Behavior

Check if it's the latest version, I guess by git commits.

(Shell equivalent lookup would resemble: curl -fsS 'https://api.github.com/repos/vlang/v-analyzer/commits' | jq -r '.[0].sha' or git ls-remote https://github.com/vlang/v-analyzer main | cut -f1)

Current Behavior

cli execution error: Failed to download script: net.http.HeaderKeyError: Invalid header key: 'Cache-Control'

image

Reproduction Steps

FROM gentoo/stage3

RUN emerge-webrsync -qq \
&& emerge -j10 dev-vcs/git \
&& git clone https://github.com/vlang/v --depth 1 /usr/local/v \
&& cd /usr/local/v \
&& make -j \
&& ln -sfnv /usr/local/v/v /usr/local/bin/v \
&& git clone https://github.com/vlang/v-analyzer /tmp/v-analyzer --depth 1 --recurse --shallow-submodules \
&& cd /tmp/v-analyzer \
&& v build.vsh release

WORKDIR /tmp/v-analyzer

Then / # bin/v-analyzer up

Possible Solution

Ignore unrecognized server headers.

Additional Information/Context

IPv4-only network at present location.

It shouldn't matter, but Github responds with lowercase headers over http/2 and titlecase headers over http/1.1 and http/1.0.

strace output

Environment details (v doctor output)

V full version: V 0.4.8 7bd2bef
OS: linux, "Gentoo Linux"
Processor: 10 cpus, 64bit, little endian, aarch64

getwd: /tmp/v-analyzer
vexe: /usr/local/v/v
vexe mtime: 2024-10-28 15:50:00

vroot: OK, value: /usr/local/v
VMODULES: OK, value: /root/.vmodules
VTMP: OK, value: /tmp/v_0

Git version: git version 2.45.2
Git vroot status: weekly.2024.43-56-g7bd2bef1
.git/config present: true

CC version: cc (Gentoo 13.3.1_p20240614 p17) 13.3.1 20240614
thirdparty/tcc status: thirdparty-linux-aarch64 ecc2f67a

Editor name

lazyvim (neovim) &| vscode

v-analyzer Version

v-analyzer version 0.0.4-beta.1.ea53875

VS Code Extension Version

v0.0.2 (vosca.vscode-v-analyzer)

@skull-squadron skull-squadron added the bug Something isn't working label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant