From 28326606f5fb64256900fc2ac7f2a185201a417b Mon Sep 17 00:00:00 2001 From: John Date: Thu, 24 Oct 2019 20:22:37 +0800 Subject: [PATCH] fix issue in resource file handler for ghttp.Server --- net/ghttp/ghttp_server_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ghttp/ghttp_server_handler.go b/net/ghttp/ghttp_server_handler.go index 797eaf8f1..587456f6a 100644 --- a/net/ghttp/ghttp_server_handler.go +++ b/net/ghttp/ghttp_server_handler.go @@ -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 }