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).
Coverage increased (+0.2%) to 97.297% when pulling c10242d6c97f7048d2b8124e139421c34ccd4155 on tt:handle-partial-bodies into cc25ae9b399782f549c4af89b5197976c09b6122 on slogsdon:master.
Coverage increased (+0.2%) to 97.297% when pulling c10242d6c97f7048d2b8124e139421c34ccd4155 on tt:handle-partial-bodies into cc25ae9b399782f549c4af89b5197976c09b6122 on slogsdon:master.
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).