-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include headers when serving blob through proxy
In commit 1795292 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>
- Loading branch information
Showing
2 changed files
with
20 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters