Skip to content

Commit

Permalink
Merge pull request #122 from rebuy-de/fix-content-type
Browse files Browse the repository at this point in the history
fix content-type
  • Loading branch information
svenwltr authored Jul 20, 2022
2 parents 69bf23a + 192570f commit 781592b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webutil/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ func (v *View) JSON(status int, data any) http.HandlerFunc {
return
}

w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.WriteHeader(status)
w.Header().Set("Content-Type", "application/json")
buf.WriteTo(w)
}
}
Expand All @@ -123,8 +123,8 @@ func (v *View) HTML(status int, filename string, data any) http.HandlerFunc {
return
}

w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.WriteHeader(status)
w.Header().Set("Content-Type", "text/html")
buf.WriteTo(w)
}
}

0 comments on commit 781592b

Please sign in to comment.