Skip to content

fix(repo): accept gzip-compressed index.yaml responses - #32483

Open
vigneshakaviki wants to merge 1 commit into
helm:mainfrom
vigneshakaviki:fix-httpgetter-gzip
Open

fix(repo): accept gzip-compressed index.yaml responses#32483
vigneshakaviki wants to merge 1 commit into
helm:mainfrom
vigneshakaviki:fix-httpgetter-gzip

Conversation

@vigneshakaviki

Copy link
Copy Markdown

What this PR does / why we need it:

Fixes #32479.

HTTPGetter currently disables HTTP compression across the board. That is correct for chart archive downloads, but it also means repository index requests never advertise gzip support.

This change keeps chart downloads unchanged and narrowly opts index.yaml requests into gzip by:

  • sending Accept-Encoding: gzip only for index.yaml requests
  • transparently decompressing gzip responses only for those requests

That allows large repository indexes to be transferred compressed without changing .tgz download behavior.

Special notes for your reviewer:

This is intentionally narrow. Enabling HTTP compression globally in HTTPGetter would risk transparently decompressing chart archives when servers send Content-Encoding: gzip.

Validation run locally:

  • go test ./pkg/repo/v1 -run TestDownloadIndexFile/should_accept_gzip-compressed_index_responses -count=1
  • go test ./pkg/getter ./pkg/repo/v1 -count=1
  • PATH="$(go env GOPATH)/bin:$PATH" make test-style

If applicable:

  • this PR contains user facing changes (the docs needed label should be applied if so)
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

Signed-off-by: vigneshakaviki <kumarvignesh295@gmail.com>
@pull-request-size pull-request-size Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 27, 2026
@github-actions github-actions Bot added the v4.x Issues and Pull Requests related to the major version v4 label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files. v4.x Issues and Pull Requests related to the major version v4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http-gzip-repo-update-index.yaml

1 participant