Skip to content

feature/http-gzip-index.yaml - #32478

Open
rafal-prasal wants to merge 1 commit into
helm:mainfrom
rafal-prasal:feature/http-gzip-index.yaml
Open

feature/http-gzip-index.yaml#32478
rafal-prasal wants to merge 1 commit into
helm:mainfrom
rafal-prasal:feature/http-gzip-index.yaml

Conversation

@rafal-prasal

Copy link
Copy Markdown

What this PR does / why we need it:

As index.yaml can become big, sending it uncompressed over network becomes a problem.
Fortunately web servers offer compression of content on the fly.
http client must come with proper headers and then server responds accordingly if it supports it.

How it works
client -> "Accept-Encoding: gzip"
server -> "Content-Encoding: gzip"
server -> gzipped content

Special notes for your reviewer:

this solution is completely transparent. it will work only when web server supports it.
it is added only in case of reaching for index.yaml. otherwise httpClient works as before.

If applicable:

  • this PR has been tested for backwards compatibility

@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
Signed-off-by: Rafal Prasal <rafal.prasal@gmail.com>
@rafal-prasal
rafal-prasal force-pushed the feature/http-gzip-index.yaml branch from 77d2038 to 24a980a Compare July 27, 2026 12:14
@rafal-prasal

rafal-prasal commented Jul 27, 2026

Copy link
Copy Markdown
Author

this resolves #32479

@rafal-prasal

Copy link
Copy Markdown
Author

this is pull request i created. i believe it is more compliant with HTTP headers behaviour

#32478

Comment thread pkg/getter/httpgetter.go
return nil, err
}

isRepositoryIndexRequest := isRepositoryIndexRequestURL(href)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use an option e.g. WithAcceptCompression() so the caller may specify compression should be enabled, rather than "hard-coding" index.yaml.

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.

2 participants