1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fixes work of inspectResponse in case of ContentLength=-1

Signed-off-by: Sergii Kabashniuk <skabashnyuk@codenvy.com>
This commit is contained in:
Sergii Kabashniuk 2017-01-29 15:01:53 +02:00
parent 8820d0aec0
commit 22a9ec009b

View file

@ -129,7 +129,7 @@ func inspectResponse(ct string, r io.ReadCloser, clen int64) (string, io.ReadClo
return ct, r, err return ct, r, err
} }
preambleR := bytes.NewReader(preamble) preambleR := bytes.NewReader(preamble[:rlen])
bodyReader := ioutil.NopCloser(io.MultiReader(preambleR, r)) bodyReader := ioutil.NopCloser(io.MultiReader(preambleR, r))
// Some web servers will use application/octet-stream as the default // Some web servers will use application/octet-stream as the default
// content type for files without an extension (e.g. 'Dockerfile') // content type for files without an extension (e.g. 'Dockerfile')