From d5a43f6844198aa0d2f0f4212236d49aa5a603b1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 1 Mar 2020 12:51:11 +0000 Subject: [PATCH] Debug --- daemon.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/daemon.py b/daemon.py index 9368fd63..ebbd4fad 100644 --- a/daemon.py +++ b/daemon.py @@ -2382,20 +2382,27 @@ class PubServer(BaseHTTPRequestHandler): if '?' in actor: actor=actor.split('?')[0] actor=self.server.domainFull+'/users/'+actor + print('Edit blog actor: '+actor) pathWithoutOptions=self.path.split('?')[0] - if actor in pathWithoutOptions: + print('Edit blog path: '+pathWithoutOptions) + if actor+'/' in pathWithoutOptions: + msg=None nickname=getNicknameFromActor(self.path) - postUrl=pathWithoutOptions+'/statuses/'+messageId - msg=htmlEditBlog(self.server.mediaInstance, \ - self.server.translate, \ - self.server.baseDir, \ - self.server.httpPrefix, \ - self.path, \ - replyPageNumber, \ - nickname,self.server.domain, \ - postUrl) + if nickname: + postUrl=pathWithoutOptions+'/statuses/'+messageId + print('Edit blog nickname: '+nickname) + print('Edit blog post: '+postUrl) + msg=htmlEditBlog(self.server.mediaInstance, \ + self.server.translate, \ + self.server.baseDir, \ + self.server.httpPrefix, \ + self.path, \ + replyPageNumber, \ + nickname,self.server.domain, \ + postUrl) if msg: - msg-msg.encode() + print('Edit blog write: '+postUrl) + msg=msg.encode() self._set_headers('text/html',len(msg),cookie) self._write(msg) self.server.GETbusy=False