swift/test/unit
Samuel Merritt 25ebf3aa9e Raise error on long or short DLO
The GET response for a DLO has a Content-Length that's computed from
the container listing, but the response body's length is determined by
the segments. If a segment grows or shrinks between when the headers
are sent and when the segment is requested, this confuses clients.

For example, if the DLO is longer than its Content-Length and the
client sends another request on the same TCP connection, then it can
get leftover object bytes instead of an HTTP status line.
Alternately, if the headers it sends fill up the TCP buffers since
Swift won't read them until the first response is done, then deadlock
hilarity ensues.

If the DLO is shorter than its Content-Length, you're pretty much
guaranteed a deadlock: the client is waiting for the rest of the
response, and the server is waiting for a new request.

Now SegmentedIterable detects both these conditions and raises an
exception so that the TCP connection gets torn down. It can't save
this request, but it can stop the next one from getting hosed too.

Change-Id: Icf79ba046ef7aaaab49ce6d0b33147332c967afc
2014-02-20 21:03:51 -08:00
..
account Allow log disable in account/container server 2014-02-17 19:38:26 +00:00
cli Add tests for swift-ring-builder 2014-02-05 16:20:09 +00:00
common Raise error on long or short DLO 2014-02-20 21:03:51 -08:00
container Allow log disable in account/container server 2014-02-17 19:38:26 +00:00
obj Support If-[None-]Match for object HEAD, SLO, and DLO 2014-02-20 14:54:26 -08:00
proxy Merge "Move all DLO functionality to middleware" 2014-02-05 22:59:15 +00:00
test_locale Move test.unit.locale out of gettext's way 2014-01-24 01:24:08 -08:00
__init__.py Merge "Fix bug in obj updater run_once()." 2013-11-27 17:52:49 +00:00