Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix end-of-stream handling in parse_payload #173

Merged
merged 1 commit into from
Apr 12, 2018
Merged

Commits on Apr 12, 2018

  1. fix end-of-stream handling in parse_payload

    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.
    jannic committed Apr 12, 2018
    Configuration menu
    Copy the full SHA
    72bc154 View commit details
    Browse the repository at this point in the history