Skip to content

Conversation

@tt
Copy link
Contributor

@tt tt commented Feb 6, 2017

Plug.Conn.read_body will by default read 8,000,000 bytes. If the body is larger, it results in an error as the return signature doesn't match.

This reads 8,000,000 bytes as many times as necessary and use a stream implementation as is already the format accepted by HTTPoison. This might break with other HTTP clients but it's not really a breaking change and those would already be broken for bodies this large (and bodies below the default is not handled any differently).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 97.297% when pulling c10242d on tt:handle-partial-bodies into cc25ae9 on slogsdon:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 97.297% when pulling c10242d on tt:handle-partial-bodies into cc25ae9 on slogsdon:master.

@slogsdon slogsdon merged commit c7baffc into slogsdon:master Feb 6, 2017
@slogsdon
Copy link
Owner

slogsdon commented Feb 6, 2017

Thanks, @tt! I'll get a new release pushed out to Hex with this and your other PR tonight.

@tt tt deleted the handle-partial-bodies branch February 7, 2017 08:53
@tt tt mentioned this pull request Feb 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants