Merge pull request #464 from elotreum/header-fixes

http: explicitly set Content-Type header
This commit is contained in:
Jimmy Zelinskie 2020-01-14 15:52:46 -05:00 committed by GitHub
commit 89cdaa8c6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -318,6 +318,7 @@ func (f *Frontend) announceRoute(w http.ResponseWriter, r *http.Request, _ httpr
return
}
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
err = WriteAnnounceResponse(w, resp)
if err != nil {
WriteError(w, err)
@ -375,6 +376,7 @@ func (f *Frontend) scrapeRoute(w http.ResponseWriter, r *http.Request, _ httprou
return
}
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
err = WriteScrapeResponse(w, resp)
if err != nil {
WriteError(w, err)