[S] Change in pysim[master]: osmo-smdpp + es9p_client: HTTP status 204 is used for handleNotification
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37511?usp=email ) Change subject: osmo-smdpp + es9p_client: HTTP status 204 is used for handleNotification ...................................................................... osmo-smdpp + es9p_client: HTTP status 204 is used for handleNotification As SGP.22 states, the handleNotification endpoint uses HTTP status 204, not 200 (due to its empty body). Change-Id: I890bdbd3e1c4578d2d5f0367958fdce26e338cac --- M osmo-smdpp.py M pySim/esim/es9p.py 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/11/37511/1 diff --git a/osmo-smdpp.py b/osmo-smdpp.py index e9638aa..4420b1c 100755 --- a/osmo-smdpp.py +++ b/osmo-smdpp.py @@ -526,6 +526,9 @@ print("handleNotification: EID %s: %s of %s" % (eid, pmo, iccid)) else: raise ValueError(pendingNotification) + # SGP.22 Section 6.3: "A normal notification function execution status (MEP Notification) + # SHALL be indicated by the HTTP status code '204' (No Content) with an empty HTTP response body" + request.setResponseCode(204) #@app.route('/gsma/rsp3/es9plus/handleDeviceChangeRequest, methods=['POST']') #@rsp_api_wrapper diff --git a/pySim/esim/es9p.py b/pySim/esim/es9p.py index 41f2eeb..2c4b10f 100644 --- a/pySim/esim/es9p.py +++ b/pySim/esim/es9p.py @@ -136,6 +136,7 @@ 'pendingNotification': param.PendingNotification, } input_mandatory = ['pendingNotification'] + expected_http_status = 204 # ES9+ CancelSession function (SGP.22 section 6.5.2.10) class CancelSession(Es9PlusApiFunction): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37511?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I890bdbd3e1c4578d2d5f0367958fdce26e338cac Gerrit-Change-Number: 37511 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge@osmocom.org> Gerrit-MessageType: newchange
participants (1)
-
laforge