summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorzhangguanzhang <zhangguanzhang@qq.com>2020-06-12 20:00:55 +0800
committerzhangguanzhang <zhangguanzhang@qq.com>2020-06-12 23:33:09 +0800
commitf9abd33c23f08f47df66da79532c0b8d02ef9a61 (patch)
tree64b011437263f3d5ebb753134003c8a3af35ce35 /pkg/api
parent64eae15aa7905dd49f4a348f6b4765dfb4d9dd91 (diff)
downloadpodman-f9abd33c23f08f47df66da79532c0b8d02ef9a61.tar.gz
podman-f9abd33c23f08f47df66da79532c0b8d02ef9a61.tar.bz2
podman-f9abd33c23f08f47df66da79532c0b8d02ef9a61.zip
Add the missing return
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/images_build.go4
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)