fix issue in resource file handler for ghttp.Server

This commit is contained in:
John
2019-10-24 20:22:37 +08:00
parent 91c98bbb60
commit 28326606f5

View File

@ -250,7 +250,7 @@ func (s *Server) serveFile(r *Request, f *staticServeFile, allowIndex ...bool) {
} else {
info := f.file.FileInfo()
r.Response.wroteHeader = true
http.ServeContent(r.Response.Writer, r.Request, info.Name(), info.ModTime(), f.file)
http.ServeContent(r.Response.Writer.RawWriter(), r.Request, info.Name(), info.ModTime(), f.file)
}
return
}