Fix upload buffering tests.

The app used to send a response before reading the upload data.
This causes Nginx to detect a broken pipe error, and sending
back a Bad Gateway response. We now have the app read all upload
data.