Commit 0ddcb83418

Andrew Kelley <andrew@ziglang.org>
2024-02-17 03:31:34
std.http.Client.fetch: remove inappropriate seek
no
1 parent 7036644
Changed files (1)
lib
std
lib/std/http/Client.zig
@@ -1659,7 +1659,6 @@ pub fn fetch(client: *Client, allocator: Allocator, options: FetchOptions) !Fetc
     switch (options.payload) {
         .string => |str| try req.writeAll(str),
         .file => |file| {
-            try file.seekTo(0);
             var fifo = std.fifo.LinearFifo(u8, .{ .Static = 8192 }).init();
             try fifo.pump(file.reader(), req.writer());
         },