From 65bfd803eb943078cf3608003039708c06f58454 Mon Sep 17 00:00:00 2001 From: pennae Date: Sat, 4 Feb 2023 02:16:02 +0100 Subject: switch to hyper backend for web-push upgrading dependencies will mean we have to use hyper for web-push instead of isahc. sadly hyper doesn't send content-length headers for empty bodies, but we can fudge that for the tests. --- tests/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/api.py b/tests/api.py index da82d37..f76abc7 100644 --- a/tests/api.py +++ b/tests/api.py @@ -208,7 +208,9 @@ class PushServer: self.send_response(200) self.end_headers() - q.put((self.path, self.headers, self.rfile.read(int(self.headers['content-length'])))) + q.put((self.path, + self.headers, + self.rfile.read(int(self.headers.get('content-length', 0))))) server = self.server = http.server.ThreadingHTTPServer(("localhost", PUSH_PORT), Handler) threading.Thread(target=server.serve_forever).start() -- cgit v1.2.3