mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-19 12:16:30 +00:00
Merge pull request #8044 from brahmaroutu/container_copy_6107
Change the copy command Content-Type header to x-tar
This commit is contained in:
@@ -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") {
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user