authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-04 18:47:39 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-04 18:47:39 -08:00
log7e7a657c703eeadb346d35c7278e4b42d4da0c6d
tree850fd44b969deef20b46edd1d5a4355d1fba752d
parentb10d837cba9fdbc5876e0645474ec3c04ede6e34

"A client SHOULD ignore the reason-phrase content."

rfc7230 3.1.2.

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

http.zig+1-4
......@@ -255,10 +255,7 @@ pub const ClientRequest = struct {
255255 const status = std.meta.intToEnum(Status, status_int) catch return error.Bad;
256256 if (!std.mem.eql(u8, &try req.readArray(1), " ")) return error.Bad;
257257 var phrase_buf: [64]u8 = undefined;
258 const actual_phrase = try req.readUntilDelimitersBuf(&phrase_buf, "\r\n");
259 if (status.phrase()) |phrase|
260 if (!std.mem.eql(u8, actual_phrase, phrase))
261 return error.Bad;
258 _ = try req.readUntilDelimitersBuf(&phrase_buf, "\r\n");
262259 req.status = status;
263260
264261 var headers_list = std.ArrayList(u8).init(req.allocator);