| ... | @@ -255,10 +255,7 @@ pub const ClientRequest = struct { | ... | @@ -255,10 +255,7 @@ pub const ClientRequest = struct { |
| 255 | const status = std.meta.intToEnum(Status, status_int) catch return error.Bad; | 255 | const status = std.meta.intToEnum(Status, status_int) catch return error.Bad; |
| 256 | if (!std.mem.eql(u8, &try req.readArray(1), " ")) return error.Bad; | 256 | if (!std.mem.eql(u8, &try req.readArray(1), " ")) return error.Bad; |
| 257 | var phrase_buf: [64]u8 = undefined; | 257 | var phrase_buf: [64]u8 = undefined; |
| 258 | const actual_phrase = try req.readUntilDelimitersBuf(&phrase_buf, "\r\n"); | 258 | _ = 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; | | |
| 262 | req.status = status; | 259 | req.status = status; |
| 263 | | 260 | |
| 264 | var headers_list = std.ArrayList(u8).init(req.allocator); | 261 | var headers_list = std.ArrayList(u8).init(req.allocator); |