From c107eb2ed89817215d0a348cdf032b0c17bb4cc2 Mon Sep 17 00:00:00 2001 From: croneter Date: Mon, 18 Oct 2021 09:41:38 +0200 Subject: [PATCH] Do not send a Connection: close header --- resources/lib/plexbmchelper/listener.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/plexbmchelper/listener.py b/resources/lib/plexbmchelper/listener.py index 62386918..ee0e28f0 100644 --- a/resources/lib/plexbmchelper/listener.py +++ b/resources/lib/plexbmchelper/listener.py @@ -90,9 +90,9 @@ class MyHandler(BaseHTTPRequestHandler): for key in headers: self.send_header(key, headers[key]) self.send_header('Content-Length', len(body)) - self.send_header('Connection', "close") self.end_headers() - self.wfile.write(body.encode('utf-8')) + if body: + self.wfile.write(body.encode('utf-8')) except Exception as exc: LOG.debug('Exception encountered while responding: %s', exc)