From 5b8822b0ce95061479c8cd4fc1ed555defa64a14 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 26 Apr 2026 16:52:46 -0700 Subject: [PATCH] fix compile error in client Status changed in 9bfb8b5d623aed32d903e4f8a3fb5252d6b17f41 --- http.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/http.zig b/http.zig index 45281dca5854029046ae88a4dcb97774ba4d5d39..fee8f4a5410745a98f8b21a039f7198ca3cd2ad7 100644 --- a/http.zig +++ b/http.zig @@ -19,6 +19,8 @@ pub const Method = enum { }; pub const Status = enum(u10) { + invalid = 0, + @"continue" = 100, // RFC7231, Section 6.2.1 switching_protocols = 101, // RFC7231, Section 6.2.2 processing = 102, // RFC2518 @@ -175,7 +177,7 @@ pub fn open(allocator: std.mem.Allocator, method: Method, input: []const u8) !Cl const u = try url.URL.parse(allocator, input, null); defer allocator.free(u.href); - const addr: net.Address = .fromUrl(&u, allocator); + const addr: net.Address = try .fromUrl(&u, allocator); const conn = try addr.tcpConnect(); errdefer conn.close(); @@ -202,7 +204,7 @@ pub fn open(allocator: std.mem.Allocator, method: Method, input: []const u8) !Cl .stream = conn, .writer = bufw, .reader = .init(conn), - .status = @enumFromInt(0), + .status = .invalid, .headers = .init(allocator), }; } -- 2.54.0