From 33e76d74ad6a42026e5bb1932239b8e7b08d3507 Mon Sep 17 00:00:00 2001 From: Dustin Date: Tue, 11 Jun 2024 16:27:24 -0600 Subject: [PATCH] Fix nested paths in public folder on windows --- src/jetzig/http/Server.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jetzig/http/Server.zig b/src/jetzig/http/Server.zig index 2fc17e1..e2d6976 100644 --- a/src/jetzig/http/Server.zig +++ b/src/jetzig/http/Server.zig @@ -608,10 +608,10 @@ fn matchPublicContent(self: *Server, request: *jetzig.http.Request) !?StaticReso if (std.mem.eql(u8, file_path, request.path.file_path[1..])) { const content = try iterable_dir.readFileAlloc( request.allocator, - file.path, + file_path, jetzig.config.get(usize, "max_bytes_public_content"), ); - const extension = std.fs.path.extension(file.path); + const extension = std.fs.path.extension(file_path); const mime_type = if (self.mime_map.get(extension)) |mime| mime else "application/octet-stream"; return .{ .content = content,