mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
fixed setContentTypeFromFilename consts
This commit is contained in:
parent
290d8bd7cc
commit
7141318caf
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue