Reject if no Accept header

main
Bob Mottram 2019-11-15 11:18:49 +00:00
parent e0ab020773
commit ec672b81a9
1 changed files with 3 additions and 0 deletions

View File

@ -853,6 +853,7 @@ class PubServer(BaseHTTPRequestHandler):
print('GET Not authorized') print('GET Not authorized')
if not self.server.session: if not self.server.session:
print('Starting new session')
self.server.session= \ self.server.session= \
createSession(self.server.useTor) createSession(self.server.useTor)
@ -861,6 +862,8 @@ class PubServer(BaseHTTPRequestHandler):
if self.headers.get('Accept'): if self.headers.get('Accept'):
if self._requestHTTP(): if self._requestHTTP():
htmlGET=True htmlGET=True
else:
return
# treat shared inbox paths consistently # treat shared inbox paths consistently
if self.path=='/sharedInbox' or \ if self.path=='/sharedInbox' or \