Skip to content

Commit

Permalink
Set blob content type to disable detection (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
phillebaba authored Jul 27, 2024
2 parents e030842 + 27fa7d6 commit ecfdd57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#519](https://github.com/spegel-org/spegel/pull/519) Extend tests for containerd.
- [#520](https://github.com/spegel-org/spegel/pull/520) Add tests for metrics.
- [#536](https://github.com/spegel-org/spegel/pull/536) Update Go version to 1.22.5.
- [#547](https://github.com/spegel-org/spegel/pull/547) Set blob content type to disable detection.

### Deprecated

Expand Down
1 change: 1 addition & 0 deletions pkg/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ func (r *Registry) handleBlob(rw mux.ResponseWriter, req *http.Request, ref refe
rw.WriteError(http.StatusInternalServerError, fmt.Errorf("could not determine size of blob with digest %s: %w", ref.dgst.String(), err))
return
}
rw.Header().Set("Content-Type", "application/octet-stream")
rw.Header().Set("Content-Length", strconv.FormatInt(size, 10))
rw.Header().Set("Docker-Content-Digest", ref.dgst.String())
if req.Method == http.MethodHead {
Expand Down

0 comments on commit ecfdd57

Please sign in to comment.