rss mime type

main
Bob Mottram 2020-02-27 20:33:49 +00:00
parent 44d027e84f
commit 867be4d249
1 changed files with 52 additions and 50 deletions

View File

@ -1025,7 +1025,7 @@ class PubServer(BaseHTTPRequestHandler):
maxPostsInRSSFeed,1)
if msg!=None:
msg=msg.encode()
self._set_headers('application/rss+xml',len(msg),cookie)
self._set_headers('text/xml',len(msg),cookie)
self._write(msg)
return
self._404()
@ -1036,6 +1036,7 @@ class PubServer(BaseHTTPRequestHandler):
self.path=='/blog/' or \
self.path=='/blogs' or \
self.path=='/blogs/'):
if '/rss.xml' not in self.path:
if not self.server.session:
self.server.session= \
createSession(self.server.useTor)
@ -1057,6 +1058,7 @@ class PubServer(BaseHTTPRequestHandler):
# show a particular page of blog entries
# for a particular account
if htmlGET and self.path.startswith('/blog/'):
if '/rss.xml' not in self.path:
pageNumber=1
nickname=self.path.split('/blog/')[1]
if '/' in nickname: