repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
f350303
parent
3c3f86d
author
Cotton Hou
date
2024-03-17 13:51:39 +0000 UTC
fix(prose): RSS content-type with charset=utf-8 (#103)

1 files changed,  +2, -2
M prose/api.go
+2, -2
 1@@ -705,7 +705,7 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
 2 		http.Error(w, "Could not generate atom rss feed", http.StatusInternalServerError)
 3 	}
 4 
 5-	w.Header().Add("Content-Type", "application/atom+xml")
 6+	w.Header().Add("Content-Type", "application/atom+xml; charset=utf-8")
 7 	_, err = w.Write([]byte(rss))
 8 	if err != nil {
 9 		logger.Error(err.Error())
10@@ -786,7 +786,7 @@ func rssHandler(w http.ResponseWriter, r *http.Request) {
11 		http.Error(w, "Could not generate atom rss feed", http.StatusInternalServerError)
12 	}
13 
14-	w.Header().Add("Content-Type", "application/atom+xml")
15+	w.Header().Add("Content-Type", "application/atom+xml; charset=utf-8")
16 	_, err = w.Write([]byte(rss))
17 	if err != nil {
18 		logger.Error(err.Error())