diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-15 13:17:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 13:17:41 -0400 |
commit | 6e0cf678745a1dff267b800fd3490e6889b473ec (patch) | |
tree | 40f32a0905ef9ce5be564b369fc5a343db9c0fdd | |
parent | 2716234af3bf4e11b8017c67a770985ea8382baf (diff) | |
parent | f9abd33c23f08f47df66da79532c0b8d02ef9a61 (diff) | |
download | podman-6e0cf678745a1dff267b800fd3490e6889b473ec.tar.gz podman-6e0cf678745a1dff267b800fd3490e6889b473ec.tar.bz2 podman-6e0cf678745a1dff267b800fd3490e6889b473ec.zip |
Merge pull request #6590 from zhangguanzhang/master
Add the missing return in the API handlers' image_build method
-rw-r--r-- | pkg/api/handlers/compat/images_build.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go index 6cc766a38..399c104e9 100644 --- a/pkg/api/handlers/compat/images_build.go +++ b/pkg/api/handlers/compat/images_build.go @@ -36,6 +36,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { if hdr[0] != "application/x-tar" { utils.BadRequest(w, "Content-Type", hdr[0], fmt.Errorf("Content-Type: %s is not supported. Should be \"application/x-tar\"", hdr[0])) + return } } @@ -260,8 +261,7 @@ func extractTarFile(r *http.Request, w http.ResponseWriter) (string, error) { r.Body.Close() if err != nil { - utils.InternalServerError(w, - fmt.Errorf("failed Request: Unable to copy tar file from request body %s", r.RequestURI)) + return "", fmt.Errorf("failed Request: Unable to copy tar file from request body %s", r.RequestURI) } _, _ = tarBall.Seek(0, 0) |