From e6171127dc8c155fba8412d20ac0e16fa689a883 Mon Sep 17 00:00:00 2001 From: croneter Date: Mon, 18 Oct 2021 13:29:32 +0200 Subject: [PATCH] Don't simply swallow all http server exceptions --- resources/lib/plexbmchelper/listener.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/resources/lib/plexbmchelper/listener.py b/resources/lib/plexbmchelper/listener.py index 28274ed4..057220d2 100644 --- a/resources/lib/plexbmchelper/listener.py +++ b/resources/lib/plexbmchelper/listener.py @@ -82,16 +82,13 @@ class MyHandler(BaseHTTPRequestHandler): def response(self, body, headers=None, code=200): headers = {} if headers is None else headers - try: - self.send_response(code) - for key in headers: - self.send_header(key, headers[key]) - self.send_header('Content-Length', len(body)) - self.end_headers() - if body: - self.wfile.write(body.encode('utf-8')) - except Exception as exc: - LOG.debug('Exception encountered while responding: %s', exc) + self.send_response(code) + for key in headers: + self.send_header(key, headers[key]) + self.send_header('Content-Length', len(body)) + self.end_headers() + if body: + self.wfile.write(body.encode('utf-8')) def answer_request(self, send_data): self.serverlist = self.server.client.getServerList()