From 505e4116ebb47c2c8f7c05dac445aee35f8560f6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 18 Jun 2020 22:20:56 +0100 Subject: [PATCH] Set a dummy Accept if it doesn't exist --- daemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon.py b/daemon.py index aadfd6cd..c7e3273d 100644 --- a/daemon.py +++ b/daemon.py @@ -593,6 +593,10 @@ class PubServer(BaseHTTPRequestHandler): def _hasAccept(self, callingDomain: str) -> bool: if self.headers.get('Accept') or callingDomain.endswith('.b32.i2p'): + if not self.headers.get('Accept'): + self.headers['Accept'] = \ + 'text/html,application/xhtml+xml,' \ + 'application/xml;q=0.9,image/webp,*/*;q=0.8' return True return False