From f679751670912f014997a0da9be698b19723db21 Mon Sep 17 00:00:00 2001 From: bashrc Date: Wed, 18 Feb 2026 18:33:00 +0000 Subject: [PATCH] Tidying --- daemon.py | 20 ++++---------------- daemon_get.py | 5 +---- daemon_head.py | 5 +---- daemon_post.py | 5 +---- 4 files changed, 7 insertions(+), 28 deletions(-) diff --git a/daemon.py b/daemon.py index 1ef446529..33eb5982b 100644 --- a/daemon.py +++ b/daemon.py @@ -254,10 +254,7 @@ class PubServer(BaseHTTPRequestHandler): if self.server.starting_daemon: return if check_bad_path(self.path): - calling_ip_address = self.request.getpeername() - if calling_ip_address: - print('WARN: bad path PROPFIND ' + - self.path + ' ' + str(calling_ip_address)) + print('WARN: bad pathx PROPFIND ' + self.path) http_400(self) return @@ -267,10 +264,7 @@ class PubServer(BaseHTTPRequestHandler): if self.server.starting_daemon: return if check_bad_path(self.path): - calling_ip_address = self.request.getpeername() - if calling_ip_address: - print('WARN: bad path PROPFIND ' + - self.path + ' ' + str(calling_ip_address)) + print('WARN: bad path PROPFIND ' + self.path) http_400(self) return @@ -280,10 +274,7 @@ class PubServer(BaseHTTPRequestHandler): if self.server.starting_daemon: return if check_bad_path(self.path): - calling_ip_address = self.request.getpeername() - if calling_ip_address: - print('WARN: bad path REPORT ' + - self.path + ' ' + str(calling_ip_address)) + print('WARN: bad path REPORT ' + self.path) http_400(self) return @@ -293,10 +284,7 @@ class PubServer(BaseHTTPRequestHandler): if self.server.starting_daemon: return if check_bad_path(self.path): - calling_ip_address = self.request.getpeername() - if calling_ip_address: - print('WARN: bad path DELETE ' + - self.path + ' ' + str(calling_ip_address)) + print('WARN: bad path DELETE ' + self.path) http_400(self) return diff --git a/daemon_get.py b/daemon_get.py index 58b163acc..08382be2a 100644 --- a/daemon_get.py +++ b/daemon_get.py @@ -248,10 +248,7 @@ def daemon_http_get(self) -> None: if self.server.starting_daemon: return if check_bad_path(self.path): - calling_ip_address = self.request.getpeername() - if calling_ip_address: - print('WARN: bad path GET ' + - self.path + ' ' + str(calling_ip_address)) + print('WARN: bad path GET ' + self.path) http_400(self) return diff --git a/daemon_head.py b/daemon_head.py index 82c130867..ce0829e73 100644 --- a/daemon_head.py +++ b/daemon_head.py @@ -31,10 +31,7 @@ def daemon_http_head(self) -> None: if self.server.starting_daemon: return if check_bad_path(self.path): - calling_ip_address = self.request.getpeername() - if calling_ip_address: - print('WARN: bad path HEAD ' + - self.path + ' ' + str(calling_ip_address)) + print('WARN: bad path HEAD ' + self.path) http_400(self) return diff --git a/daemon_post.py b/daemon_post.py index b8f4ebb23..ac319950b 100644 --- a/daemon_post.py +++ b/daemon_post.py @@ -161,10 +161,7 @@ def daemon_http_post(self) -> None: if self.server.starting_daemon: return if check_bad_path(self.path): - calling_ip_address = self.request.getpeername() - if calling_ip_address: - print('WARN: bad path POST ' + - self.path + ' ' + str(calling_ip_address)) + print('WARN: bad path POST ' + self.path) http_400(self) return