authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-26 16:52:46 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-26 16:52:46 -07:00
log5b8822b0ce95061479c8cd4fc1ed555defa64a14
treeee4a05aa4ae7a36f6fa860c84f8c47f3a689f195
parent6c41c8737ce0094ea93b6b012e3e130a1060cddf
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

fix compile error in client

Status changed in 9bfb8b5d623aed32d903e4f8a3fb5252d6b17f41

1 files changed, 4 insertions(+), 2 deletions(-)

http.zig+4-2
......@@ -19,6 +19,8 @@ pub const Method = enum {
1919};
2020
2121pub const Status = enum(u10) {
22 invalid = 0,
23
2224 @"continue" = 100, // RFC7231, Section 6.2.1
2325 switching_protocols = 101, // RFC7231, Section 6.2.2
2426 processing = 102, // RFC2518
......@@ -175,7 +177,7 @@ pub fn open(allocator: std.mem.Allocator, method: Method, input: []const u8) !Cl
175177 const u = try url.URL.parse(allocator, input, null);
176178 defer allocator.free(u.href);
177179
178 const addr: net.Address = .fromUrl(&u, allocator);
180 const addr: net.Address = try .fromUrl(&u, allocator);
179181
180182 const conn = try addr.tcpConnect();
181183 errdefer conn.close();
......@@ -202,7 +204,7 @@ pub fn open(allocator: std.mem.Allocator, method: Method, input: []const u8) !Cl
202204 .stream = conn,
203205 .writer = bufw,
204206 .reader = .init(conn),
205 .status = @enumFromInt(0),
207 .status = .invalid,
206208 .headers = .init(allocator),
207209 };
208210}