@@ -154,7 +154,7 @@ func TestContextJSON(t *testing.T) {
154154 err := c .JSON (http .StatusOK , user {1 , "Jon Snow" })
155155 if assert .NoError (t , err ) {
156156 assert .Equal (t , http .StatusOK , rec .Code )
157- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
157+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
158158 assert .Equal (t , userJSON + "\n " , rec .Body .String ())
159159 }
160160}
@@ -178,7 +178,7 @@ func TestContextJSONPrettyURL(t *testing.T) {
178178 err := c .JSON (http .StatusOK , user {1 , "Jon Snow" })
179179 if assert .NoError (t , err ) {
180180 assert .Equal (t , http .StatusOK , rec .Code )
181- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
181+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
182182 assert .Equal (t , userJSONPretty + "\n " , rec .Body .String ())
183183 }
184184}
@@ -192,7 +192,7 @@ func TestContextJSONPretty(t *testing.T) {
192192 err := c .JSONPretty (http .StatusOK , user {1 , "Jon Snow" }, " " )
193193 if assert .NoError (t , err ) {
194194 assert .Equal (t , http .StatusOK , rec .Code )
195- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
195+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
196196 assert .Equal (t , userJSONPretty + "\n " , rec .Body .String ())
197197 }
198198}
@@ -213,7 +213,7 @@ func TestContextJSONWithEmptyIntent(t *testing.T) {
213213 err := c .json (http .StatusOK , user {1 , "Jon Snow" }, emptyIndent )
214214 if assert .NoError (t , err ) {
215215 assert .Equal (t , http .StatusOK , rec .Code )
216- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
216+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
217217 assert .Equal (t , buf .String (), rec .Body .String ())
218218 }
219219}
@@ -244,7 +244,7 @@ func TestContextJSONBlob(t *testing.T) {
244244 err = c .JSONBlob (http .StatusOK , data )
245245 if assert .NoError (t , err ) {
246246 assert .Equal (t , http .StatusOK , rec .Code )
247- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
247+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
248248 assert .Equal (t , userJSON , rec .Body .String ())
249249 }
250250}
@@ -533,7 +533,7 @@ func TestContext_JSON_CommitsCustomResponseCode(t *testing.T) {
533533
534534 if assert .NoError (t , err ) {
535535 assert .Equal (t , http .StatusCreated , rec .Code )
536- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
536+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
537537 assert .Equal (t , userJSON + "\n " , rec .Body .String ())
538538 }
539539}
0 commit comments