diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2018-09-20 11:36:07 +0800 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2018-09-20 11:36:07 +0800 |
commit | d53df6794551ddc6c85cfec94d9a304c95266e6d (patch) | |
tree | d31f693ece0b80b0fa2d4de44bcdcbfc971a2742 /fs.go | |
parent | Allows for empty content type by default. Fixes #214 (diff) | |
download | fasthttp-d53df6794551ddc6c85cfec94d9a304c95266e6d.tar.gz fasthttp-d53df6794551ddc6c85cfec94d9a304c95266e6d.tar.bz2 fasthttp-d53df6794551ddc6c85cfec94d9a304c95266e6d.zip |
Fix Content-Type bug in FS
Fixes #417
Diffstat (limited to 'fs.go')
-rw-r--r-- | fs.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -823,7 +823,8 @@ func (h *fsHandler) handleRequest(ctx *RequestCtx) { } } } - if len(ctx.Response.Header.ContentType()) == 0 { + hdr.noDefaultContentType = true + if len(hdr.ContentType()) == 0 { ctx.SetContentType(ff.contentType) } ctx.SetStatusCode(statusCode) |