diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-08-29 20:19:23 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-08-30 00:48:50 -0700 |
| commit | 9a0970a12bdcae105b6f3f65c0a72d95a209bd35 (patch) | |
| tree | ab0de8f2447b5e52c2bb5c92a976a52fb4b613ee /lib/std/Build/WebServer.zig | |
| parent | 79f267f6b9e7f80a6fed3b1019f9de942841c3be (diff) | |
| download | zig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.tar.gz zig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.zip | |
rework std.Io.Writer.Allocating to support runtime-known alignment
Also, breaking API changes to:
* std.fs.Dir.readFileAlloc
* std.fs.Dir.readFileAllocOptions
Diffstat (limited to 'lib/std/Build/WebServer.zig')
| -rw-r--r-- | lib/std/Build/WebServer.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Build/WebServer.zig b/lib/std/Build/WebServer.zig index b456aa16ca..1b3e3bfe82 100644 --- a/lib/std/Build/WebServer.zig +++ b/lib/std/Build/WebServer.zig @@ -446,7 +446,7 @@ pub fn serveFile( // The desired API is actually sendfile, which will require enhancing http.Server. // We load the file with every request so that the user can make changes to the file // and refresh the HTML page without restarting this server. - const file_contents = path.root_dir.handle.readFileAlloc(gpa, path.sub_path, 10 * 1024 * 1024) catch |err| { + const file_contents = path.root_dir.handle.readFileAlloc(path.sub_path, gpa, .limited(10 * 1024 * 1024)) catch |err| { log.err("failed to read '{f}': {s}", .{ path, @errorName(err) }); return error.AlreadyReported; }; |
