浏览代码

registry: fix content-type for PushImageJSONIndex

Johan Euphrosine 11 年之前
父节点
当前提交
d93023daa9
共有 1 个文件被更改,包括 1 次插入0 次删除
  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")