1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-23 19:24:13 +00:00

prevent auto detect of content-type

https://golang.org/src/net/http/server.go#L1031
This commit is contained in:
JessonChan 2016-02-24 10:34:20 +08:00
parent 20301bc212
commit 76d69b6e51

View File

@ -616,6 +616,8 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
context.Output.Header("Server", BConfig.ServerName)
}
context.Output.Header("Content-Type", "text/html; charset=utf-8")
var urlPath string
if !BConfig.RouterCaseSensitive {
urlPath = strings.ToLower(r.URL.Path)