1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 06:57:43 +02:00

actix-multipart: Fix multipart boundary reading (#1205)

* actix-multipart: Fix multipart boundary reading

If we're not ready to read the first line after the multipart field
(which should be a "\r\n" line) then return Pending instead of Ready(None)
so that we will get called again to read that line.

Without this I was getting MultipartError::Boundary from read_boundary()
because it got the "\r\n" line instead of the boundary.

Also tweaks the test_stream test to test partial reads.

This is a forward port of #1189 from 1.0

* actix-multipart: Update changes for boundary fix
This commit is contained in:
Alexander Larsson
2019-12-12 02:03:44 +01:00
committed by Nikolay Kim
parent 131c897099
commit a612b74aeb
2 changed files with 56 additions and 20 deletions

View File

@ -1,5 +1,9 @@
# Changes
## [2.0.0-alpha.4] - 2019-12-xx
* Multipart handling now handles Pending during read of boundary #1205
## [0.2.0-alpha.2] - 2019-12-03
* Migrate to `std::future`