component AP gateway: properly close the HTTP connection on checkSignature exception:

if something is going wrong during `checkSignature` (other than signature verification
failing), a `500 Internal Server Error` code is returned, and the connection is properly
closed.
This commit is contained in:
Goffi 2022-11-15 18:10:33 +01:00
commit b30a558f13

View file

@ -1049,6 +1049,14 @@ class HTTPAPGServer(web_resource.Resource):
)
request.finish()
return
except Exception as e:
self.responseCode(
request,
http.INTERNAL_SERVER_ERROR,
f"Can't check signature: {e}"
)
request.finish()
return
request.setResponseCode(http.ACCEPTED)