зеркало из https://github.com/microsoft/docker.git
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:
Родитель
88a786d3c4
Коммит
788e4acaa3
|
@ -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 := eng.Job("container_copy", vars["name"], copyData.Get("Resource"))
|
||||||
job.Stdout.Add(w)
|
job.Stdout.Add(w)
|
||||||
|
w.Header().Set("Content-Type", "application/x-tar")
|
||||||
if err := job.Run(); err != nil {
|
if err := job.Run(); err != nil {
|
||||||
log.Errorf("%s", err.Error())
|
log.Errorf("%s", err.Error())
|
||||||
if strings.Contains(err.Error(), "No such container") {
|
if strings.Contains(err.Error(), "No such container") {
|
||||||
|
|
|
@ -710,7 +710,7 @@ Copy files or folders of container `id`
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/octet-stream
|
Content-Type: application/x-tar
|
||||||
|
|
||||||
{{ TAR STREAM }}
|
{{ TAR STREAM }}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче