mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
4327a72542
commit
9c8702133b
77
daemon.py
77
daemon.py
|
@ -4979,79 +4979,22 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
self._benchmarkPOSTtimings(POSTstartTime,POSTtimings,14)
|
self._benchmarkPOSTtimings(POSTstartTime,POSTtimings,14)
|
||||||
|
|
||||||
pageNumber=self._receiveNewPost(authorized,'newpost',self.path)
|
# receive different types of post created by htmlNewPost
|
||||||
|
postTypes=["newpost","newunlisted","newfollowers","newdm","newreport","newshare"]
|
||||||
|
for currPostType in postTypes:
|
||||||
|
if currPostType!='newshare':
|
||||||
|
postRedirect=self.server.defaultTimeline
|
||||||
|
else:
|
||||||
|
postRedirect='shares'
|
||||||
|
|
||||||
|
pageNumber=self._receiveNewPost(authorized,currPostType,self.path)
|
||||||
if pageNumber:
|
if pageNumber:
|
||||||
nickname=self.path.split('/users/')[1]
|
nickname=self.path.split('/users/')[1]
|
||||||
if '/' in nickname:
|
if '/' in nickname:
|
||||||
nickname=nickname.split('/')[0]
|
nickname=nickname.split('/')[0]
|
||||||
self._redirect_headers(self.server.httpPrefix+'://'+self.server.domainFull+ \
|
self._redirect_headers(self.server.httpPrefix+'://'+self.server.domainFull+ \
|
||||||
'/users/'+nickname+ \
|
'/users/'+nickname+ \
|
||||||
'/'+self.server.defaultTimeline+ \
|
'/'+postRedirect+ \
|
||||||
'?page='+str(pageNumber),cookie)
|
|
||||||
self.server.POSTbusy=False
|
|
||||||
return
|
|
||||||
pageNumber=self._receiveNewPost(authorized,'newunlisted',self.path)
|
|
||||||
if pageNumber:
|
|
||||||
nickname=self.path.split('/users/')[1]
|
|
||||||
if '/' in nickname:
|
|
||||||
nickname=nickname.split('/')[0]
|
|
||||||
self._redirect_headers(self.server.httpPrefix+'://'+self.server.domainFull+ \
|
|
||||||
'/users/'+nickname+ \
|
|
||||||
'/'+self.server.defaultTimeline+ \
|
|
||||||
'?page='+str(pageNumber),cookie)
|
|
||||||
self.server.POSTbusy=False
|
|
||||||
return
|
|
||||||
pageNumber=self._receiveNewPost(authorized,'newfollowers',self.path)
|
|
||||||
if pageNumber:
|
|
||||||
nickname=self.path.split('/users/')[1]
|
|
||||||
if '/' in nickname:
|
|
||||||
nickname=nickname.split('/')[0]
|
|
||||||
self._redirect_headers(self.server.httpPrefix+'://'+self.server.domainFull+ \
|
|
||||||
'/users/'+nickname+ \
|
|
||||||
'/'+self.server.defaultTimeline+ \
|
|
||||||
'?page='+str(pageNumber),cookie)
|
|
||||||
self.server.POSTbusy=False
|
|
||||||
return
|
|
||||||
pageNumber=self._receiveNewPost(authorized,'newdm',self.path)
|
|
||||||
if pageNumber:
|
|
||||||
nickname=self.path.split('/users/')[1]
|
|
||||||
if '/' in nickname:
|
|
||||||
nickname=nickname.split('/')[0]
|
|
||||||
self._redirect_headers(self.server.httpPrefix+'://'+self.server.domainFull+ \
|
|
||||||
'/users/'+nickname+ \
|
|
||||||
'/'+self.server.defaultTimeline+ \
|
|
||||||
'?page='+str(pageNumber),cookie)
|
|
||||||
self.server.POSTbusy=False
|
|
||||||
return
|
|
||||||
pageNumber=self._receiveNewPost(authorized,'newreport',self.path)
|
|
||||||
if pageNumber:
|
|
||||||
nickname=self.path.split('/users/')[1]
|
|
||||||
if '/' in nickname:
|
|
||||||
nickname=nickname.split('/')[0]
|
|
||||||
self._redirect_headers(self.server.httpPrefix+'://'+self.server.domainFull+ \
|
|
||||||
'/users/'+nickname+ \
|
|
||||||
'/'+self.server.defaultTimeline+ \
|
|
||||||
'?page='+str(pageNumber),cookie)
|
|
||||||
self.server.POSTbusy=False
|
|
||||||
return
|
|
||||||
pageNumber=self._receiveNewPost(authorized,'newshare',self.path)
|
|
||||||
if pageNumber:
|
|
||||||
nickname=self.path.split('/users/')[1]
|
|
||||||
if '/' in nickname:
|
|
||||||
nickname=nickname.split('/')[0]
|
|
||||||
self._redirect_headers(self.server.httpPrefix+'://'+self.server.domainFull+ \
|
|
||||||
'/users/'+nickname+ \
|
|
||||||
'/shares?page='+str(pageNumber),cookie)
|
|
||||||
self.server.POSTbusy=False
|
|
||||||
return
|
|
||||||
pageNumber=self._receiveNewPost(authorized,'newquestion',self.path)
|
|
||||||
if pageNumber:
|
|
||||||
nickname=self.path.split('/users/')[1]
|
|
||||||
if '/' in nickname:
|
|
||||||
nickname=nickname.split('/')[0]
|
|
||||||
self._redirect_headers(self.server.httpPrefix+'://'+self.server.domainFull+ \
|
|
||||||
'/users/'+nickname+ \
|
|
||||||
'/'+self.server.defaultTimeline+ \
|
|
||||||
'?page='+str(pageNumber),cookie)
|
'?page='+str(pageNumber),cookie)
|
||||||
self.server.POSTbusy=False
|
self.server.POSTbusy=False
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue