1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-12-18 09:53:11 +01:00
Commit Graph

8 Commits

Author SHA1 Message Date
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
Yuki Okushi
ab4d8704f1
multipart: Minimize futures dependencies 2020-05-19 08:29:11 +09:00
Nikolay Kim
471f82f0e0 migrate actix-multipart 2019-11-21 16:02:17 +06:00
Nikolay Kim
ee33f52736 make extractor config type explicit 2019-04-13 16:35:25 -07:00
Nikolay Kim
4f30fa9d46 Remove generic type for request payload, always use default 2019-04-13 14:50:54 -07:00
Nikolay Kim
043f6e77ae remove nested multipart support 2019-04-13 10:11:07 -07:00
Nikolay Kim
75b213a6f0 refactor FromRequest trait 2019-04-07 14:43:07 -07:00
Nikolay Kim
e738361e09 move multipart support to separate crate 2019-04-03 12:28:58 -07:00