bottle
bottle copied to clipboard
Bottle fails with GeventServer with chunked POST request
When POSTing a chunked request to the gevent enabled bottle server, the server will return with an 400 error. The server is run like:
run(server="gevent")
With some time of debugging, it turns out that Bottle tries to parse the (assuming chunked) body again after gevent's pywsgi server already parsed the chunked body. Bottle has no problem with the built-in wsgiref server on chunked upload.
I'm not sure if this is a Bottle problem or gevent problem. Should we remove the Transfer-Encoding header in pywsgi? Or should we try to detect that the body has been parsed already and try not to parse again?