handle exception correctly in _make_app_iter_reader
_make_app_iter_reader uses a queue to pass read data to
_make_app_iter, and uses an empty string as a terminator. The problem
is that it pushes the same terminator even if it fails to reads the
data. If an exception happens before pushing all data to the queue,
_make_app_iter exits without yielding all data. In that case,
proxy-server stops in the middle of sending data, and a client waits
for all data to come infinitely.
This patch uses a boolean value for the terminator instead of an empty
string to distinguish the results, and raises an exception in the
error cases. Fixes bug 890888.
Reviewed: https:/ /review. openstack. org/11126 github. com/openstack/ swift/commit/ edd38035be4f64d 547938f44fb2d96 a72eeb672a
Committed: http://
Submitter: Jenkins
Branch: master
commit edd38035be4f64d 547938f44fb2d96 a72eeb672a
Author: MORITA Kazutaka <email address hidden>
Date: Fri Aug 10 14:00:09 2012 +0900
handle exception correctly in _make_app_ iter_reader
_make_ app_iter_ reader uses a queue to pass read data to
_make_app_iter, and uses an empty string as a terminator. The problem
is that it pushes the same terminator even if it fails to reads the
data. If an exception happens before pushing all data to the queue,
_make_app_iter exits without yielding all data. In that case,
proxy-server stops in the middle of sending data, and a client waits
for all data to come infinitely.
This patch uses a boolean value for the terminator instead of an empty
string to distinguish the results, and raises an exception in the
error cases. Fixes bug 890888.
Change-Id: Ie4d48025843aa1 bb600446da6f4fc 49f82a440bf