swift/swift
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 small typo in cli/recon.py 2014-02-13 16:45:07 -05: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 Make .expiring_objects account name configurable 2014-02-06 16:38:34 +05:30
__init__.py Make pbr a build-time only dependency 2013-10-29 12:29:49 -07:00