Allow overwrite of ContentType by caller of RequestCtx.ServeFile

This commit is contained in:
Jerry Jacobs
2017-10-07 01:21:41 +02:00
committed by Erik Dubbelboer
parent dbc9965d33
commit 6025a4a41c
+3 -1
View File
@@ -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)
}