Skip to content

Commit

Permalink
fixed setContentTypeFromFilename consts
Browse files Browse the repository at this point in the history
  • Loading branch information
renerocksai committed Jan 9, 2024
1 parent 290d8bd commit 7141318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zap.zig
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ pub const Request = struct {
const ext = std.fs.path.extension(filename);

if (ext.len > 1) {
var e = ext[1..];
var obj = fio.http_mimetype_find(@constCast(e.ptr), e.len);
const e = ext[1..];
const obj = fio.http_mimetype_find(@constCast(e.ptr), e.len);

if (util.fio2str(obj)) |mime_str| {
try self.setHeader("content-type", mime_str);
Expand Down

0 comments on commit 7141318

Please sign in to comment.