1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-11 09:49:29 +00:00
actix-web/actix-multipart/src
Matt Gathu 37c76a39ab
Fix Multipart consuming payload before header checks (#1704)
* Fix Multipart consuming payload before header checks

What
--
Split up logic in the constructor into two functions:

- **from_boundary:** build Multipart from boundary and stream
- **from_error:** build Multipart for MultipartError

Also we make the `boundary`, `from_boundary`, `from_error`  methods public within the crate so that we can use them in the extractor.

The extractor is then able to perform header checks and only consume the
payload if the checks pass.

* Add tests

* Add payload consumption test

Co-authored-by: Rob Ede <robjtede@icloud.com>
2020-09-25 14:50:37 +01:00
..
error.rs Fix missing std::error::Error implement for MultipartError. (#1382) 2020-02-27 22:34:06 +09:00
extractor.rs Fix Multipart consuming payload before header checks (#1704) 2020-09-25 14:50:37 +01:00
lib.rs fix CI clippy warnings (#1664) 2020-09-10 14:46:35 +01:00
server.rs Fix Multipart consuming payload before header checks (#1704) 2020-09-25 14:50:37 +01:00