aboutsummaryrefslogtreecommitdiff
path: root/fs.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2018-09-20 11:36:07 +0800
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2018-09-20 11:36:07 +0800
commitd53df6794551ddc6c85cfec94d9a304c95266e6d (patch)
treed31f693ece0b80b0fa2d4de44bcdcbfc971a2742 /fs.go
parentAllows for empty content type by default. Fixes #214 (diff)
downloadfasthttp-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.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs.go b/fs.go
index 7314062..f0ea066 100644
--- a/fs.go
+++ b/fs.go
@@ -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)