From 032dc7685f0bbaee3ac8f6717cb693b2d455cabb Mon Sep 17 00:00:00 2001 From: Antony Chazapis Date: Tue, 18 Oct 2011 13:22:35 +0300 Subject: [PATCH] Handle chunked from gunicorn properly. --- pithos/api/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pithos/api/util.py b/pithos/api/util.py index 09d09ca..d21e237 100644 --- a/pithos/api/util.py +++ b/pithos/api/util.py @@ -500,7 +500,7 @@ def socket_read_iterator(request, length=0, blocksize=4096): sock = raw_input_socket(request) if length < 0: # Chunked transfers # Small version (server does the dechunking). - if request.environ.get('mod_wsgi.input_chunked', None): + if request.environ.get('mod_wsgi.input_chunked', None) or request.META['SERVER_SOFTWARE'].startswith('gunicorn'): while length < MAX_UPLOAD_SIZE: data = sock.read(blocksize) if data == '': -- 1.7.10.4