From 2b07d685e38d5d05ec02ec3985b57a5689eeb7c3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 27 Aug 2019 17:27:48 +0100 Subject: [PATCH] Check for image --- daemon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon.py b/daemon.py index 0b3dfe70..ab088710 100644 --- a/daemon.py +++ b/daemon.py @@ -152,7 +152,9 @@ class PubServer(BaseHTTPRequestHandler): def _requestHTTP(self) -> bool: """Should a http response be given? """ - if '*/*' in self.headers['Accept']: + if 'image/' in self.headers['Accept']: + return False + if self.headers['Accept'].startswith('*'): return False if 'json' in self.headers['Accept']: return False