Fix various issues (#524)

* Fix various issues

* Fix multipart body hang

* drop req if error

* Make multipart errors more helpful
This commit is contained in:
Geometrically
2023-01-16 16:45:19 -07:00
committed by GitHub
parent 1679a3f844
commit 867ba7b68f
7 changed files with 427 additions and 357 deletions

View File

@@ -37,9 +37,7 @@ pub async fn read_from_field(
if bytes.len() >= cap {
return Err(CreateError::InvalidInput(String::from(err_msg)));
} else {
bytes.extend_from_slice(
&chunk.map_err(CreateError::MultipartError)?,
);
bytes.extend_from_slice(&chunk?);
}
}
Ok(bytes)