Browse Source

Use proper content-type for RSS feed

pull/2/head
Noah Petherbridge 8 years ago
parent
commit
1cbf93502d
  1. 8
      rophako/modules/blog.py

8
rophako/modules/blog.py

@ -2,7 +2,7 @@
"""Endpoints for the web blog."""
from flask import Blueprint, g, request, redirect, url_for, session, flash
from flask import Blueprint, g, request, redirect, url_for, session, flash, make_response
import re
import datetime
import calendar
@ -291,7 +291,9 @@ def rss():
["pubDate", time.strftime(rss_time, time.gmtime(post["time"]))],
])
return doc.toprettyxml(encoding="utf-8")
resp = make_response(doc.toprettyxml(encoding="utf-8"))
resp.headers["Content-Type"] = "application/rss+xml; charset=utf-8"
return resp
def xml_add_text_tags(doc, root_node, tags):
@ -423,4 +425,4 @@ def partial_tags():
g.info["tags"] = result
g.info["has_small"] = has_small
return template("blog/categories.inc.html")
return template("blog/categories.inc.html")

Loading…
Cancel
Save