Earlier condition

main
Bob Mottram 2020-10-12 14:17:38 +01:00
parent c3d5523b07
commit c62a190a79
1 changed files with 27 additions and 27 deletions

View File

@ -9083,6 +9083,33 @@ class PubServer(BaseHTTPRequestHandler):
'permitted directory',
'login shown done')
print('TEST1 ' + self.path)
if authorized and htmlGET and '/users/' in self.path and \
self.path.endswith('/newswiremobile'):
print('TEST2 ' + self.path)
nickname = getNicknameFromActor(self.path)
if not nickname:
self._404()
self.server.GETbusy = False
return
print('TEST3 ' + nickname)
timelinePath = \
'/users/' + nickname + '/' + self.server.defaultTimeline
print('TEST4 ' + timelinePath)
msg = htmlNewswireMobile(self.server.baseDir,
nickname,
self.server.domain,
self.server.domainFull,
self.server.httpPrefix,
self.server.translate,
self.server.newswire,
self.server.positiveVoting,
timelinePath)
self._set_headers('text/html', len(msg), cookie, callingDomain)
self._write(msg)
self.server.GETbusy = False
return
# hashtag search
if self.path.startswith('/tags/') or \
(authorized and '/tags/' in self.path):
@ -9153,33 +9180,6 @@ class PubServer(BaseHTTPRequestHandler):
'search screen shown')
return
if htmlGET and '/users/' in self.path:
print('TEST1 ' + self.path)
if self.path.endswith('/newswiremobile'):
print('TEST2 ' + self.path)
nickname = getNicknameFromActor(self.path)
if not nickname:
self._404()
self.server.GETbusy = False
return
print('TEST3 ' + nickname)
timelinePath = \
'/users/' + nickname + '/' + self.server.defaultTimeline
print('TEST4 ' + timelinePath)
msg = htmlNewswireMobile(self.server.baseDir,
nickname,
self.server.domain,
self.server.domainFull,
self.server.httpPrefix,
self.server.translate,
self.server.newswire,
self.server.positiveVoting,
timelinePath)
self._set_headers('text/html', len(msg), cookie, callingDomain)
self._write(msg)
self.server.GETbusy = False
return
self._benchmarkGETtimings(GETstartTime, GETtimings,
'hashtag search done',
'search screen shown done')