From 6c0b11aef5f1e2118ec0aa66db317e280dccb648 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 8 Apr 2024 15:26:58 +0100 Subject: [PATCH] Tidying --- daemon_get.py | 8 +++++++- daemon_get_pwa.py | 22 ++++++++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/daemon_get.py b/daemon_get.py index a0ee14f8a..5fbd061d6 100644 --- a/daemon_get.py +++ b/daemon_get.py @@ -503,7 +503,13 @@ def daemon_http_get(self) -> None: progressive_web_app_manifest(self, self.server.base_dir, calling_domain, referer_domain, - getreq_start_time) + getreq_start_time, + self.server.http_prefix, + self.server.domain, + self.server.onion_domain, + self.server.i2p_domain, + self.server.fitness, + self.server.debug) return else: self.path = '/' diff --git a/daemon_get_pwa.py b/daemon_get_pwa.py index 343c22d8a..434107d60 100644 --- a/daemon_get_pwa.py +++ b/daemon_get_pwa.py @@ -19,7 +19,13 @@ from fitnessFunctions import fitness_performance def progressive_web_app_manifest(self, base_dir: str, calling_domain: str, referer_domain: str, - getreq_start_time) -> None: + getreq_start_time, + http_prefix: str, + domain: str, + onion_domain: str, + i2p_domain: str, + fitness: {}, + debug: bool) -> None: """gets the PWA manifest """ manifest = pwa_manifest(base_dir) @@ -27,10 +33,10 @@ def progressive_web_app_manifest(self, base_dir: str, msg_str = convert_domains(calling_domain, referer_domain, msg_str, - self.server.http_prefix, - self.server.domain, - self.server.onion_domain, - self.server.i2p_domain) + http_prefix, + domain, + onion_domain, + i2p_domain) msg = msg_str.encode('utf-8') msglen = len(msg) @@ -39,8 +45,8 @@ def progressive_web_app_manifest(self, base_dir: str, set_headers(self, protocol_str, msglen, None, calling_domain, False) write2(self, msg) - if self.server.debug: + if debug: print('Sent manifest: ' + calling_domain) - fitness_performance(getreq_start_time, self.server.fitness, + fitness_performance(getreq_start_time, fitness, '_GET', '_progressive_web_app_manifest', - self.server.debug) + debug)