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 {...@@ -19,6 +19,8 @@ pub const Method = enum {
19};19};
2020
21pub const Status = enum(u10) {21pub const Status = enum(u10) {
22 invalid = 0,
23
22 @"continue" = 100, // RFC7231, Section 6.2.124 @"continue" = 100, // RFC7231, Section 6.2.1
23 switching_protocols = 101, // RFC7231, Section 6.2.225 switching_protocols = 101, // RFC7231, Section 6.2.2
24 processing = 102, // RFC251826 processing = 102, // RFC2518
...@@ -175,7 +177,7 @@ pub fn open(allocator: std.mem.Allocator, method: Method, input: []const u8) !Cl...@@ -175,7 +177,7 @@ pub fn open(allocator: std.mem.Allocator, method: Method, input: []const u8) !Cl
175 const u = try url.URL.parse(allocator, input, null);177 const u = try url.URL.parse(allocator, input, null);
176 defer allocator.free(u.href);178 defer allocator.free(u.href);
177179
178 const addr: net.Address = .fromUrl(&u, allocator);180 const addr: net.Address = try .fromUrl(&u, allocator);
179181
180 const conn = try addr.tcpConnect();182 const conn = try addr.tcpConnect();
181 errdefer conn.close();183 errdefer conn.close();
...@@ -202,7 +204,7 @@ pub fn open(allocator: std.mem.Allocator, method: Method, input: []const u8) !Cl...@@ -202,7 +204,7 @@ pub fn open(allocator: std.mem.Allocator, method: Method, input: []const u8) !Cl
202 .stream = conn,204 .stream = conn,
203 .writer = bufw,205 .writer = bufw,
204 .reader = .init(conn),206 .reader = .init(conn),
205 .status = @enumFromInt(0),207 .status = .invalid,
206 .headers = .init(allocator),208 .headers = .init(allocator),
207 };209 };
208}210}