distribution/registry/proxy
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
..
scheduler Move context package internal 2023-10-27 10:58:37 -04:00
proxyauth.go Move context package internal 2023-10-27 10:58:37 -04:00
proxyblobstore.go Include headers when serving blob through proxy 2024-02-01 19:31:53 -05:00
proxyblobstore_test.go Include headers when serving blob through proxy 2024-02-01 19:31:53 -05:00
proxymanifeststore.go feat(linter): enable errcheck linter in golangci-lint (#4158) 2023-11-21 11:57:34 +00:00
proxymanifeststore_test.go Fix proxy statistics 2023-10-31 12:16:41 +02:00
proxymetrics.go cleanup: move init funcs to the top of the source 2023-11-28 06:50:48 +00:00
proxyregistry.go Move context package internal 2023-10-27 10:58:37 -04:00
proxytagservice.go go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
proxytagservice_test.go Enable prealloc linter 2023-09-03 22:41:51 +01:00