fix multipart inner part values

This commit is contained in:
Luna 2021-04-10 15:29:15 -03:00
parent aed35035f5
commit b4b51a3e05

View file

@ -145,7 +145,9 @@ const Multipart = struct {
var single_part_it = std.mem.split(disposition_part, "="); var single_part_it = std.mem.split(disposition_part, "=");
const inner_part_name = single_part_it.next().?; const inner_part_name = single_part_it.next().?;
const inner_part_value = single_part_it.next().?; const inner_part_value_quoted = single_part_it.next().?;
const inner_part_value = std.mem.trim(u8, inner_part_value_quoted, "\"");
if (std.mem.eql(u8, inner_part_name, "name")) dispo_name = inner_part_value; if (std.mem.eql(u8, inner_part_name, "name")) dispo_name = inner_part_value;
if (std.mem.eql(u8, inner_part_name, "filename")) dispo_filename = inner_part_value; if (std.mem.eql(u8, inner_part_name, "filename")) dispo_filename = inner_part_value;