Do not close http output stream when responding

This commit is contained in:
croneter 2021-10-18 08:59:56 +02:00
parent 56a3cdbbd8
commit f2e03e878e

View file

@ -78,7 +78,6 @@ class MyHandler(BaseHTTPRequestHandler):
'x-plex-device-name, x-plex-platform, x-plex-product, accept, ' 'x-plex-device-name, x-plex-platform, x-plex-product, accept, '
'x-plex-device, x-plex-device-screen-resolution') 'x-plex-device, x-plex-device-screen-resolution')
self.end_headers() self.end_headers()
self.wfile.close()
def sendOK(self): def sendOK(self):
self.send_response(200) self.send_response(200)
@ -93,7 +92,6 @@ class MyHandler(BaseHTTPRequestHandler):
self.send_header('Connection', "close") self.send_header('Connection', "close")
self.end_headers() self.end_headers()
self.wfile.write(body.encode('utf-8')) self.wfile.write(body.encode('utf-8'))
self.wfile.close()
except Exception: except Exception:
pass pass