Fix write after close on http response

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 12d83e727dd3522006b53afbcfac3cdce178117a
Component: engine
This commit is contained in:
Derek McGowan
2015-01-21 15:14:01 -08:00
committed by Stephen J Day
parent 05dc63ed6e
commit c43f530252
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -111,6 +111,7 @@ func (o *Output) Close() error {
}
}
o.tasks.Wait()
o.dests = nil
return firstErr
}
+1 -1
View File
@@ -226,7 +226,7 @@ func (r *Session) PutV2ImageBlob(ep *Endpoint, imageName, sumType, sumStr string
method := "PUT"
log.Debugf("[registry] Calling %q %s", method, location)
req, err = r.reqFactory.NewRequest(method, location, blobRdr)
req, err = r.reqFactory.NewRequest(method, location, ioutil.NopCloser(blobRdr))
if err != nil {
return err
}