aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mpaste.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/mpaste.go b/mpaste.go
index 16a1cef..c306878 100644
--- a/mpaste.go
+++ b/mpaste.go
@@ -142,7 +142,7 @@ func syntaxHighlighting(w http.ResponseWriter, r *http.Request) {
data, err := ioutil.ReadFile(filePrefix + removeExt(r.URL.Path[1:]))
if err != nil {
- w.Header().Set("Content-Type", "text/plain")
+ w.Header().Set("Content-Type", "text/plain; charset=utf-8")
writeHeader(w, http.StatusNotFound, "")
return
}
@@ -175,10 +175,10 @@ func endpoint(w http.ResponseWriter, r *http.Request) {
writeHeader(w, http.StatusNotFound, "")
return
case urlSyntax:
- w.Header().Set("Content-Type", "text/html")
+ w.Header().Set("Content-Type", "text/html; charset=utf-8")
syntaxHighlighting(w, r)
case urlValid:
- w.Header().Set("Content-Type", "text/plain")
+ w.Header().Set("Content-Type", "text/plain; charset=utf-8")
http.ServeFile(w, r, filePrefix+r.URL.Path[1:])
}
case http.MethodPost: