From f19cca070e962d3a7126feb97bd3f18a15bd821e Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Sat, 5 Jul 2014 19:23:40 +0200 Subject: [PATCH] Using c.Data() to write 404 error --- gin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gin.go b/gin.go index f150af3..a4871f4 100644 --- a/gin.go +++ b/gin.go @@ -143,7 +143,7 @@ func (engine *Engine) handle404(w http.ResponseWriter, req *http.Request) { c.Writer.setStatus(404) c.Next() if !c.Writer.Written() { - c.String(404, "404 page not found") + c.Data(404, MIMEPlain, []byte("404 page not found")) } engine.reuseContext(c) }