mirror of
https://github.com/distribution/distribution.git
synced 2025-07-06 20:10:16 +00:00
Merge pull request #4068 from milosgajdos/2_8-dont-close-request-body
[release/2.8] Do not close HTTP request body in HTTP handler
This commit is contained in:
commit
1eb2c30122
@ -620,8 +620,6 @@ func (app *App) configureSecret(configuration *configuration.Configuration) {
|
||||
}
|
||||
|
||||
func (app *App) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
defer r.Body.Close() // ensure that request body is always closed.
|
||||
|
||||
// Prepare the context with our own little decorations.
|
||||
ctx := r.Context()
|
||||
ctx = dcontext.WithRequest(ctx, r)
|
||||
|
@ -33,8 +33,6 @@ type tagsAPIResponse struct {
|
||||
|
||||
// GetTags returns a json list of tags for a specific image name.
|
||||
func (th *tagsHandler) GetTags(w http.ResponseWriter, r *http.Request) {
|
||||
defer r.Body.Close()
|
||||
|
||||
tagService := th.Repository.Tags(th)
|
||||
tags, err := tagService.All(th)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user