bf7887a102
Since the WebOb 1.7 release webob doesn't natively support receiving chunked transfer encoding bodies. [1] When glance is run under the eventlet wsgi server this was fine, because eventlet will dechunk the input on read() (or readline()) calls, so from the webob perspective it's just a file object. However, the effort to remove the dependence on using eventlet as the web server and deploy glance as a traditional wsgi script we lose this mechanism. The wsgi spec doesn't provide a consistent mechanism When we run glance under uwsgi the uwsgi server provides an api to read chunked data. [2] However, we need to explicitly call that api when to dechunk the data and pass it to glance code which expects a file object. This commit solves this issue by creating a fake file class that will call the chunked_read() api from uwsgi on read() calls. This object is then used if we're running the api code under uwsgi and the body has a chunked transfer-encoding. In conjuction with devstack change Iab2e2848877fa1497008d18c05b0154892941589 this closes glance bug 1703856 [1] https://docs.pylonsproject.org/projects/webob/en/stable/whatsnew-1.7.html#backwards-incompatibility [2] http://uwsgi-docs.readthedocs.io/en/latest/Chunked.html Partial-bug 1703856 Co-Authored-By: Chris Dent <cdent@anticdent.org> Change-Id: Idf6b4b891ba31cccbeb53d373b40fce5380cea64 |
||
---|---|---|
.. | ||
scripts | ||
__init__.py | ||
test_client.py | ||
test_config.py | ||
test_exception.py | ||
test_location_strategy.py | ||
test_property_utils.py | ||
test_rpc.py | ||
test_scripts.py | ||
test_swift_store_utils.py | ||
test_timeutils.py | ||
test_utils.py | ||
test_wsgi.py |