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

Set blob content type to disable detection #547

Merged
merged 1 commit into from
Jul 27, 2024
Merged

Conversation

phillebaba
Copy link
Member

The default behavior in Golang is to try to detect the content type is no header is set. This adds a small bit of over head. For manifests we return the correct content type in the header as it is required by the distribution spec. The spec does not however mention any guidelines for what to do for setting the blobs content type.

https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pulling-blobs

For this reason we will just set the header to a generic application/octet-stream which is what is already being set today.

Copy link

codecov bot commented Jul 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files Coverage Δ
pkg/registry/registry.go 45.70% <0.00%> (-0.21%) ⬇️

@phillebaba phillebaba merged commit ecfdd57 into main Jul 27, 2024
8 of 9 checks passed
@phillebaba phillebaba deleted the blob-content-type branch July 27, 2024 11:35
t1mt pushed a commit to t1mt/spegel that referenced this pull request Sep 3, 2024
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

Successfully merging this pull request may close these issues.

1 participant