mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 20:22:20 +08:00
Merge d66ef6e33709230cb287cbd2605920be5a66ca0c into 48fec0650dd70e158755b5d2fd839832dbae4437
This commit is contained in:
commit
49da93a2aa
@ -47,7 +47,9 @@ var (
|
||||
)
|
||||
|
||||
func writeHeader(w http.ResponseWriter, code int, contentType string) {
|
||||
w.Header().Set("Content-Type", contentType+"; charset=utf-8")
|
||||
if w.Header().Get("Content-Type") == "" {
|
||||
w.Header().Set("Content-Type", contentType+"; charset=utf-8")
|
||||
}
|
||||
w.WriteHeader(code)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user