Sfoglia il codice sorgente

Merge pull request #2338 from proppy/patch-1

Registry: Fix content-type for PushImageJSONIndex
Michael Crosby 11 anni fa
parent
commit
b73065ab33
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      registry/registry.go

+ 1 - 0
registry/registry.go

@@ -504,6 +504,7 @@ func (r *Registry) PushImageJSONIndex(indexEp, remote string, imgList []*ImgData
 	if err != nil {
 		return nil, err
 	}
+	req.Header.Add("Content-type", "application/json")
 	req.SetBasicAuth(r.authConfig.Username, r.authConfig.Password)
 	req.ContentLength = int64(len(imgListJSON))
 	req.Header.Set("X-Docker-Token", "true")