Skip to content

Commit

Permalink
fix content type without charset no semicolon (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbpyr authored Nov 2, 2022
1 parent c961b11 commit 112df3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/prologue/core/context.nim
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,10 @@ proc staticFileResponse*(
ctx.response.headers = headers.get

if mimetype.len != 0:
ctx.response.setHeader("Content-Type", fmt"{mimetype}; {charset}")
if charset.len != 0:
ctx.response.setHeader("Content-Type", fmt"{mimetype}; {charset}")
else:
ctx.response.setHeader("Content-Type", mimetype)

ctx.response.setHeader("Last-Modified", $lastModified)
ctx.response.setHeader("Etag", etag)
Expand Down

0 comments on commit 112df3c

Please sign in to comment.