Set a dummy Accept if it doesn't exist

main
Bob Mottram 2020-06-18 22:20:56 +01:00
parent b3791e703d
commit 505e4116eb
1 changed files with 4 additions and 0 deletions

View File

@ -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