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

Jar unzip fails when server does not set ContentLength #123

Closed
djcass44 opened this issue Sep 14, 2023 · 1 comment
Closed

Jar unzip fails when server does not set ContentLength #123

djcass44 opened this issue Sep 14, 2023 · 1 comment

Comments

@djcass44
Copy link
Contributor

In my environment we are behind a corporate proxy and have to pull Jars through a cache service (think Artifactory or Nexus). This service returns data using chunked encoding and therefore doesn't set the Content-Length header.

This library depends on ContentLength being set. If not set, Go sets it to -1 which causes the zip.NewReader call to fail instantly.

It should be easily fixable by simply using len(bodyBytes) when contentLength < 0. I will open an MR alongside this issue.

@fergusstrange
Copy link
Owner

Released with v1.25.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants