Réception d’erreurs 411 avec Haproxy + Nging lors du téléchargement avec codage fragmenté

voici mon architecture de serveur:

port 443 -> haproxy 1.6.3 -> nginx 1.1.19 -> uwsgi 2.0.13.1 -> serveur python wsgi (Django)

Je sais que c’est bizarre d’utiliser à la fois haproxy + nginx mais je n’ai pas le choix car j’ai besoin d’haproxy pour un autre projet sur le même serveur sur le port 443.

voici ma configuration haproxy:

frontend www-https bind *:443 ssl crt /etc/ssl/private/ mode http option httpclose acl nginx hdr_end(host) -i example.com backend nginx mode http balance leastconn option forwardfor option http-server-close option forceclose no option httpclose server nginx-01 nginx:52654 check 

et voici ma configuration nginx

 server { listen 52654 default_server; charset utf-8; client_max_body_size 75M; chunked_transfer_encoding on; location / { uwsgi_pass django; proxy_buffering off; uwsgi_param QUERY_STRING $query_ssortingng; uwsgi_param REQUEST_METHOD $request_method; uwsgi_param CONTENT_TYPE $content_type; uwsgi_param CONTENT_LENGTH $content_length; uwsgi_param REQUEST_URI $request_uri; uwsgi_param PATH_INFO $document_uri; uwsgi_param DOCUMENT_ROOT $document_root; uwsgi_param SERVER_PROTOCOL $server_protocol; uwsgi_param HTTPS $https if_not_empty; uwsgi_param REMOTE_ADDR $remote_addr; uwsgi_param REMOTE_PORT $remote_port; uwsgi_param SERVER_PORT $server_port; uwsgi_param SERVER_NAME $server_name; } } 

Le problème que j’ai est que quand je fais un téléchargement avec un client Web utilisant l’encodage fragmenté, j’obtiens l’erreur HTTP 411 Content-Length requirejse.

Si je contourne haproxy, ça marche bien. Mais utiliser haproxy + nginx me donne l’erreur 411 pour un codage par blocs.

Une idée?

Votre version de nginx est assez ancienne. Essayez de le mettre à jour.