Timur Alperovich 0900a2c244 Fix error handling in proxy/controllers/base.py.
There are a few issues going on in the
controllers/base.py:_get_response_parts_iter(). One is that the
"raise" statement that attempts to re-raise the GeneratorExit, may
re-raise ValueError if that was the last exception caught.

Secondly, the range may not actually be set in the backend_headers
(need to investigate further, as that could actually be faulty tests,
since learn_size_from_content_range should always set it). The patch
changes the Range construction to throw a ValueError if None is passed
in that case.

Lastly, the range may be only half-defined, e.g. bytes=0-. In that
case, the check of how many bytes are expected vs how many bytes have
been sent does not make sense.

Change-Id: Ida5adf3d33c736240b2c4bae5510b5289f03dee2
2016-09-07 14:00:57 -07:00
..
2016-08-29 14:32:10 +08:00