From: peusterm Date: Thu, 15 Sep 2016 13:39:36 +0000 (+0200) Subject: Fix: Use 201 as HTTP return code when a package is uploaded. X-Git-Tag: v3.1~57^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=938143e3b58c67248a95e0462b53e8ce4acf16c2;p=osm%2Fvim-emu.git Fix: Use 201 as HTTP return code when a package is uploaded. --- diff --git a/src/emuvim/api/sonata/dummygatekeeper.py b/src/emuvim/api/sonata/dummygatekeeper.py index 83737ee..8a9416c 100755 --- a/src/emuvim/api/sonata/dummygatekeeper.py +++ b/src/emuvim/api/sonata/dummygatekeeper.py @@ -556,7 +556,7 @@ class Packages(fr.Resource): s = Service(service_uuid, file_hash, upload_path) GK.register_service_package(service_uuid, s) # generate the JSON result - return {"service_uuid": service_uuid, "size": size, "sha1": file_hash, "error": None} + return {"service_uuid": service_uuid, "size": size, "sha1": file_hash, "error": None}, 201 except Exception as ex: LOG.exception("Service package upload failed:") return {"service_uuid": None, "size": 0, "sha1": None, "error": "upload failed"}, 500