distribution/registry
Mikel Rychliski 041824555c Include headers when serving blob through proxy
In commit 17952924f3 we updated ServeBlob() to use an io.MultiWriter to
write simultaneously to the local store and the HTTP response.

However, copyContent was using a type assertion to only add headers if
the io.Writer was a http.ResponseWriter. Therefore, this change caused
us to stop sending the expected headers (i.e. Content-Length, Etag,
etc.) on the first request for a blob.

Resolve the issue by explicitly passing in http.Header and setting it
unconditionally.

Signed-off-by: Mikel Rychliski <mikel@mikelr.com>
2024-02-01 19:31:53 -05:00
..
api cleanup: move init funcs to the top of the source 2023-11-28 06:50:48 +00:00
auth cleanup: move init funcs to the top of the source 2023-11-28 06:50:48 +00:00
handlers version: export getter functions 2023-12-19 13:02:44 -05:00
listener feat(linter): enable errcheck linter in golangci-lint 2023-11-18 07:19:24 +00:00
middleware Merge pull request #2752 from davidswu/registry-driver-middleware 2023-06-21 10:06:13 -07:00
proxy Include headers when serving blob through proxy 2024-02-01 19:31:53 -05:00
storage refactor(storage/s3): remove redundant len check 2024-01-17 18:27:05 +08:00
doc.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
registry.go feat: Add HTTP2 for unencrypted HTTP 2024-01-17 20:59:02 +00:00
registry_test.go feat(linter): enable errcheck linter in golangci-lint 2023-11-18 07:19:24 +00:00
root.go feat(linter): enable errcheck linter in golangci-lint 2023-11-18 07:19:24 +00:00