mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
Added ServeFile and ServeFileUncompressed to be on par with net/http
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user