authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-12 02:23:51 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-12 02:23:51 -08:00
log79815fd977854c990c513cd9d5d1d618fa259fd9
treee3bae90093eeabe0017283982da29fe8b376a180
parentc2eed6c101cd9d0dbffee42fdb91638c012ac07a

use extras.parseDigits


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

http.zig+1-1
...@@ -252,7 +252,7 @@ pub const ClientRequest = struct {...@@ -252,7 +252,7 @@ pub const ClientRequest = struct {
252252
253 // HTTP/1.1 200 OK253 // HTTP/1.1 200 OK
254 if (!std.mem.eql(u8, &try req.readArray(9), "HTTP/1.1 ")) return error.Bad;254 if (!std.mem.eql(u8, &try req.readArray(9), "HTTP/1.1 ")) return error.Bad;
255 const status_int = std.fmt.parseInt(u16, &try req.readArray(3), 10) catch return error.Bad;255 const status_int = extras.parseDigits(u16, &try req.readArray(3), 10) catch return error.Bad;
256 const status = std.meta.intToEnum(Status, status_int) catch return error.Bad;256 const status = std.meta.intToEnum(Status, status_int) catch return error.Bad;
257 if (!std.mem.eql(u8, &try req.readArray(1), " ")) return error.Bad;257 if (!std.mem.eql(u8, &try req.readArray(1), " ")) return error.Bad;
258 var phrase_buf: [64]u8 = undefined;258 var phrase_buf: [64]u8 = undefined;