fix bodies having CRLF
This commit is contained in:
parent
6a1f9a7a34
commit
fa4590171d
1 changed files with 2 additions and 1 deletions
|
@ -242,7 +242,8 @@ const Multipart = struct {
|
|||
|
||||
// read body until we find the boundary end marker (--{s} OR --{s}--)
|
||||
var it = std.mem.split(remaining_body, self.boundary);
|
||||
const body = it.next() orelse return error.MissingPartBody;
|
||||
const almost_actual_body = it.next() orelse return error.MissingPartBody;
|
||||
const body = std.mem.trimRight(u8, almost_actual_body, "\r\n");
|
||||
|
||||
const next_boundary_pos = self.stream.pos + body.len;
|
||||
const next_boundary_body = self.stream.buffer[next_boundary_pos..self.stream.buffer.len];
|
||||
|
|
Loading…
Reference in a new issue