You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was noticed during some deployment-testing of httpbin issue https://github.com/kennethreitz/httpbin/issues/340 . In that issue it is noted that having fixed some issues with the Gunicorn deployment, a different problem with chunked requests now occurs, but only when --worker-class="egg:meinheld#gunicorn_worker" is used, which is how httpbin is currently-deployed to https://httpbin.org .
Test request/response:
$ curl -v -X POST http://httpbin.org/post -d '{"message":"BLA"}' -H 'Content-Type: application/json' -H 'Transfer-Encoding: chunked'
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 54.225.130.23...
* TCP_NODELAY set
* Connected to httpbin.org (54.225.130.23) port 80 (#0)
> POST /post HTTP/1.1
> Host: httpbin.org
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/json
> Transfer-Encoding: chunked
>
> 11
* upload completely sent off: 24 out of 17 bytes
< HTTP/1.1 411 Length Required
< Date: Mon, 19 Feb 2018 22:23:59 GMT
< Connection: close
< Content-Type: text/html
< Server: meinheld/0.6.1
< Via: 1.1 vegur
<
* Closing connection 0
<html><head><title>Length Required</title></head><body><p>Length Required.</p></body></html>
The same result can be generated using a local Docker running with --worker-class="egg:meinheld#gunicorn_worker". Without the meinheld worker the request succeeds and the chunked request-data is echoed-back.
This was noticed during some deployment-testing of httpbin issue https://github.com/kennethreitz/httpbin/issues/340 . In that issue it is noted that having fixed some issues with the Gunicorn deployment, a different problem with chunked requests now occurs, but only when
--worker-class="egg:meinheld#gunicorn_worker"
is used, which is how httpbin is currently-deployed to https://httpbin.org .Test request/response:
Actual traffic on wire:
The same result can be generated using a local Docker running with
--worker-class="egg:meinheld#gunicorn_worker"
. Without the meinheld worker the request succeeds and the chunked request-data is echoed-back.The
411
error is set by https://github.com/mopemope/meinheld/blob/master/meinheld/server/http_request_parser.c#L616 , where the criteria isreq->body_type == BODY_TYPE_NONE
andreq->body_length == 0
. I can only assume that the latter occurs if there is noContent-Length
header, which is correct for a chunked-request.The text was updated successfully, but these errors were encountered: