Create session

master
Bob Mottram 2019-08-20 12:30:41 +01:00
parent 214bb22898
commit 8703f86c05
1 changed files with 8 additions and 0 deletions

View File

@ -481,6 +481,10 @@ class PubServer(BaseHTTPRequestHandler):
if self.server.debug:
print('GET Not authorized')
if not self.server.session:
self.server.session= \
createSession(self.server.domain,self.server.port,self.server.useTor)
# treat shared inbox paths consistently
if self.path=='/sharedInbox' or self.path=='/users/inbox':
self.path='/inbox'
@ -1933,6 +1937,10 @@ class PubServer(BaseHTTPRequestHandler):
return 0
def do_POST(self):
if not self.server.session:
self.server.session= \
createSession(self.server.domain,self.server.port,self.server.useTor)
if self.server.debug:
print('DEBUG: POST to from '+self.server.baseDir+ \
' path: '+self.path+' busy: '+ \