Skip to content

Commit 6834f81

Browse files
committed
Extract URL path, now with empty / v2 tho
1 parent 9bd42da commit 6834f81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn handleRequest(request: *http.Server.Request, allocator: std.mem.Allocator) !v
4444

4545
if (std.mem.startsWith(u8, request.head.target, "/index.html")) {
4646
try request.respond("", .{});
47-
} else if (std.mem.startsWith(u8, request.head.target, "")) {
47+
} else if (std.mem.eql(u8, request.head.target, "/")) {
4848
try request.respond("", .{});
4949
} else {
5050
try request.respond("", .{ .status = .not_found });

0 commit comments

Comments
 (0)