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.