From 9f074109cbff35b0b07e71b354b4c1fbdbc85d01 Mon Sep 17 00:00:00 2001 From: kukgini Date: Thu, 8 Sep 2022 19:33:47 +0900 Subject: [PATCH] fix: failed connectionless present proof on some case In demo menu (2a) connectionless proof request, If a mobile agent (for instance Trinsic) does not include Accept header when present proof request, the demo would fail. Signed-off-by: kukgini Signed-off-by: Ry Jones --- demo/runners/support/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/runners/support/agent.py b/demo/runners/support/agent.py index bd82314937..89d38c61b3 100644 --- a/demo/runners/support/agent.py +++ b/demo/runners/support/agent.py @@ -781,7 +781,7 @@ async def _send_connectionless_proof_req(self, request: ClientRequest): return web.Response(status=404) proof_reg_txn = proof_exch["presentation_request_dict"] proof_reg_txn["~service"] = await self.service_decorator() - if request.headers["Accept"] == "application/json": + if request.headers.get("Accept") == "application/json": return web.json_response(proof_reg_txn) objJsonStr = json.dumps(proof_reg_txn) objJsonB64 = base64.b64encode(objJsonStr.encode("ascii"))