main
Bob Mottram 2020-02-24 19:12:22 +00:00
parent bbd9ee20e5
commit 2282582faf
1 changed files with 3 additions and 0 deletions

View File

@ -942,6 +942,7 @@ class PubServer(BaseHTTPRequestHandler):
self.path) self.path)
if blogFilename and nickname: if blogFilename and nickname:
postJsonObject=loadJson(blogFilename) postJsonObject=loadJson(blogFilename)
print('Blog post loaded')
if isBlogPost(postJsonObject): if isBlogPost(postJsonObject):
msg=htmlBlogPost(self.server.baseDir, \ msg=htmlBlogPost(self.server.baseDir, \
self.server.httpPrefix, \ self.server.httpPrefix, \
@ -952,6 +953,8 @@ class PubServer(BaseHTTPRequestHandler):
self._set_headers('text/html',len(msg),cookie) self._set_headers('text/html',len(msg),cookie)
self._write(msg) self._write(msg)
return return
else:
print("This isn't a blog post "+str(postJsonObject))
self._404() self._404()
return return