aboutsummaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-08-20 13:14:58 -0400
committerGitHub <noreply@github.com>2021-08-20 13:14:58 -0400
commit608b8758aa30f1c1038365494e404326dda4d3fb (patch)
tree7140229f3cefdf092eba20ba71bebc9fbd4cb236 /pkg/api
parent3b4411feffd978fcae76e9db34467bac03de7e94 (diff)
parent2408247f432e637558e664a5d6fffcf8794e2acf (diff)
downloadpodman-608b8758aa30f1c1038365494e404326dda4d3fb.tar.gz
podman-608b8758aa30f1c1038365494e404326dda4d3fb.tar.bz2
podman-608b8758aa30f1c1038365494e404326dda4d3fb.zip
Merge pull request #11299 from mheon/330_final_backports
v3.3.0 Final Backports and Release Notes
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/images_build.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index 08d1df4b8..0fcca1821 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -34,13 +34,16 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
contentType := hdr[0]
switch contentType {
case "application/tar":
- logrus.Warnf("tar file content type is %s, should use \"application/x-tar\" content type", contentType)
+ logrus.Infof("tar file content type is %s, should use \"application/x-tar\" content type", contentType)
case "application/x-tar":
break
default:
- utils.BadRequest(w, "Content-Type", hdr[0],
- fmt.Errorf("Content-Type: %s is not supported. Should be \"application/x-tar\"", hdr[0]))
- return
+ if utils.IsLibpodRequest(r) {
+ utils.BadRequest(w, "Content-Type", hdr[0],
+ fmt.Errorf("Content-Type: %s is not supported. Should be \"application/x-tar\"", hdr[0]))
+ return
+ }
+ logrus.Infof("tar file content type is %s, should use \"application/x-tar\" content type", contentType)
}
}