Thanks, that helped point me to the issue. It turns out the problem was that I didn't pass --pep3333-input to uWSGI, so it was converting all CRLFs to LFs in the request body, so CONTENT_LENGTH didn't match the data length. Passing that flag to uWSGI made it pass the raw stream to my app and solved the problem.