From db04c3cbb4dcbaa7d78d30d69076381b9031d177 Mon Sep 17 00:00:00 2001 From: Hily Jiang Date: Mon, 24 Nov 2014 23:12:09 +0800 Subject: [PATCH] make Content-Type header more human-readable --- context/output.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/context/output.go b/context/output.go index 6298ee77..2141513d 100644 --- a/context/output.go +++ b/context/output.go @@ -188,7 +188,7 @@ func sanitizeValue(v string) string { // Json writes json to response body. // if coding is true, it converts utf-8 to \u0000 type. func (output *BeegoOutput) Json(data interface{}, hasIndent bool, coding bool) error { - output.Header("Content-Type", "application/json;charset=UTF-8") + output.Header("Content-Type", "application/json; charset=utf-8") var content []byte var err error if hasIndent { @@ -209,7 +209,7 @@ func (output *BeegoOutput) Json(data interface{}, hasIndent bool, coding bool) e // Jsonp writes jsonp to response body. func (output *BeegoOutput) Jsonp(data interface{}, hasIndent bool) error { - output.Header("Content-Type", "application/javascript;charset=UTF-8") + output.Header("Content-Type", "application/javascript; charset=utf-8") var content []byte var err error if hasIndent { @@ -235,7 +235,7 @@ func (output *BeegoOutput) Jsonp(data interface{}, hasIndent bool) error { // Xml writes xml string to response body. func (output *BeegoOutput) Xml(data interface{}, hasIndent bool) error { - output.Header("Content-Type", "application/xml;charset=UTF-8") + output.Header("Content-Type", "application/xml; charset=utf-8") var content []byte var err error if hasIndent {