diff options
author | Jerry Jacobs <jerry.jacobs@xor-gate.org> | 2017-10-07 01:21:41 +0200 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2018-09-13 12:27:17 +0800 |
commit | 6025a4a41c72c64db7d367b68dd2a8019bcddf97 (patch) | |
tree | edc5bee31b3b72e89f87913413a5c744f26edfab /fs.go | |
parent | Adds support for max-age cookie value. Fixes #184 (#412) (diff) | |
download | fasthttp-6025a4a41c72c64db7d367b68dd2a8019bcddf97.tar.gz fasthttp-6025a4a41c72c64db7d367b68dd2a8019bcddf97.tar.bz2 fasthttp-6025a4a41c72c64db7d367b68dd2a8019bcddf97.zip |
Allow overwrite of ContentType by caller of RequestCtx.ServeFile
Diffstat (limited to 'fs.go')
-rw-r--r-- | fs.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -823,7 +823,9 @@ func (h *fsHandler) handleRequest(ctx *RequestCtx) { } } } - ctx.SetContentType(ff.contentType) + if len(ctx.Response.Header.ContentType()) == 0 { + ctx.SetContentType(ff.contentType) + } ctx.SetStatusCode(statusCode) } |