Wrong CONTENT_LENGTH causing truncated body
Closed this issue · 0 comments
jaycle commented
Due to a bug in azure, when Content-Type
is application/json
the body gets formatted for pretty-printing, inserting spacing and \r\n
into the raw body. The Content-Length
header is left unmodified, however, resulting in a mismatch between wsgi.input
and CONTENT_LENGTH
in the wsgi environment. Ultimately, this causes the application to fail to parse the body since an application should not assume more than CONTENT_LENGTH
is readable from the byte stream.