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:
parent
4d14a623fc
commit
b30a558f13
1 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue