Files
Tim Burke
1dc3307eaf
ssync-receiver: terminate session if subreq read times out
If a PUT subrequest body iterator times out while the object server is reading it, the object server will handle the timeout and return a 500 response to the ssync receiver. Previously, the ssync receiver would attempt to drain the remainder of the subrequest body iterator and then resume reading the next subrequest from the SSYNC body. However, the attempt to drain the subrequest iterator would fail (silently) because the timeout had already caused the iterator to exit. The ssync receiver would therefore treat any remaining subrequest body as the preamble to the next subrequest. This remaining subrequest body content was likely to cause the protocol parsing to fail, but in the worst case could be erroneously interpreted as a valid subrequest. (The exact failure mechanism depends on what state the eventlet.wsgi.Input is left in when the timeout fired.) This patch ensures that the ssync receiver will terminate processing an SSYNC request if an exception occurs while reading a subrequest body. Closes-Bug: #2115991 Change-Id: I585e8a916d947c3da8d7c0e8a85cf0a8ab85f7f0 Co-authored-by: Tim Burke <tim.burke@gmail.com> Signed-off-by: Alistair Coles <alistairncoles@gmail.com>