# HG changeset patch # User Goffi # Date 1668532233 -3600 # Node ID 74f7c10a48bc26eee39cd62ad7d4144637db7a19 # Parent acc9dfc8ba8dc4dc5c4a5c28333249213f7fc06d 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. diff -r acc9dfc8ba8d -r 74f7c10a48bc sat/plugins/plugin_comp_ap_gateway/http_server.py --- a/sat/plugins/plugin_comp_ap_gateway/http_server.py Tue Nov 15 18:07:34 2022 +0100 +++ b/sat/plugins/plugin_comp_ap_gateway/http_server.py Tue Nov 15 18:10:33 2022 +0100 @@ -1049,6 +1049,14 @@ ) 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)