mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-19 06:04:40 +01:00
72bc1546c4
parse_payload can be called with a pre-filled buf. In this case, it's totaly fine for read_from_io to return sync::Ready(0) while buf is not empty. This is not an PayloadError::Incomplete. So, move the check for PayloadError::Incomplete down to the decoding code: If the decoder is not ready, but the input stream is finished, PayloadError::Incomplete will be returned.