Added ServeFile and ServeFileUncompressed to be on par with net/http

This commit is contained in:
Aliaksandr Valialkin
2016-01-17 23:12:38 +02:00
parent 7320fe3bd7
commit 764a74e2ec
4 changed files with 119 additions and 6 deletions
+2
View File
@@ -810,6 +810,8 @@ func (ctx *RequestCtx) ResetBody() {
// Note that SendFile doesn't set Content-Type for the response body,
// so set it yourself with SetContentType() before returning
// from RequestHandler.
//
// See also ServeFile, FSHandler and FS.
func (ctx *RequestCtx) SendFile(path string) error {
ifModStr := ctx.Request.Header.peek(strIfModifiedSince)
if len(ifModStr) > 0 {