Add CRLF to encoded multipart form data

Some WPT tests were failing because they expected the body for a
multipart form data response to end with a CRLF. So I updated
encode_multipart_form_data to add the missing terminator.
This commit is contained in:
glowe 2019-11-05 21:04:55 -05:00
parent afbcbf75ea
commit 3d322f96e3
4 changed files with 3 additions and 12 deletions

View file

@ -1366,7 +1366,7 @@ pub fn encode_multipart_form_data(
}
}
let mut boundary_bytes = format!("\r\n--{}--", boundary).into_bytes();
let mut boundary_bytes = format!("\r\n--{}--\r\n", boundary).into_bytes();
result.append(&mut boundary_bytes);
result