From 66492ff40a5b8cf56d0b5337744f2f912dad87c5 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Tue, 3 Aug 2021 15:03:20 +0200 Subject: [PATCH] make sure we send all the data --- owrx/controllers/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/owrx/controllers/__init__.py b/owrx/controllers/__init__.py index 791b7b1..bb929ce 100644 --- a/owrx/controllers/__init__.py +++ b/owrx/controllers/__init__.py @@ -31,7 +31,9 @@ class Controller(object): self.handler.end_headers() if type(content) == str: content = content.encode() - self.handler.wfile.write(content) + while len(content): + w = self.handler.wfile.write(content) + content = content[w:] def send_redirect(self, location, code=303): self.handler.send_response(code)