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

Change the copy command Content-Type header to x-tar

Addresses #6107

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
This commit is contained in:
Srini Brahmaroutu 2014-09-13 16:03:35 -07:00
parent 88a786d3c4
commit 788e4acaa3
2 changed files with 2 additions and 1 deletions

View file

@ -1014,6 +1014,7 @@ func postContainersCopy(eng *engine.Engine, version version.Version, w http.Resp
job := eng.Job("container_copy", vars["name"], copyData.Get("Resource"))
job.Stdout.Add(w)
w.Header().Set("Content-Type", "application/x-tar")
if err := job.Run(); err != nil {
log.Errorf("%s", err.Error())
if strings.Contains(err.Error(), "No such container") {

View file

@ -710,7 +710,7 @@ Copy files or folders of container `id`
**Example response**:
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Type: application/x-tar
{{ TAR STREAM }}