Check that accept exists

master
Bob Mottram 2019-08-31 13:38:57 +01:00
parent 0ba7f4e8b9
commit c2cf3a0dc5
1 changed files with 2 additions and 0 deletions

View File

@ -153,6 +153,8 @@ class PubServer(BaseHTTPRequestHandler):
def _requestHTTP(self) -> bool:
"""Should a http response be given?
"""
if not self.headers.get('Accept'):
return False
if 'image/' in self.headers['Accept']:
return False
if self.headers['Accept'].startswith('*'):