swift/test/unit/common/middleware
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
..
__init__.py Initial commit of middleware refactor 2010-08-20 00:42:38 +00:00
helpers.py Ensure swift.source is set for DLO/SLO requests 2014-02-11 10:22:13 -08:00
test_account_quotas.py Handle COPY verb in account quota middleware 2013-10-16 17:41:14 +02:00
test_acl.py Privileged acct ACL header, new ACL syntax, TempAuth impl. 2014-01-29 13:02:54 -08:00
test_bulk.py Merge "Make POST for bulk delete actually work" 2014-01-12 07:15:11 +00:00
test_cname_lookup.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_container_sync.py New container sync configuration option 2014-01-10 23:48:00 +00:00
test_crossdomain.py Corrected many style violations in the tests. 2013-07-24 10:18:47 -07:00
test_dlo.py Raise error on long or short DLO 2014-02-20 21:03:51 -08:00
test_domain_remap.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_except.py add bare except to catch errors 2013-11-26 14:03:30 -05:00
test_formpost.py form post over XMLHttpRequest (cors) broken 2013-10-28 22:38:53 +00:00
test_gatekeeper.py Generic means for persisting system metadata. 2014-01-06 22:29:37 +00:00
test_healthcheck.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_keystoneauth.py Do not format messages before they are logged 2013-11-21 22:34:36 -05:00
test_list_endpoints.py Use a tempfile.mkdtemp() based temporary directory 2014-01-19 16:29:45 -05:00
test_memcache.py Fix for memcache middleware configuration 2013-11-26 18:03:33 +00:00
test_name_check.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_proxy_logging.py Add accurate timestamps in proxy log 2013-11-27 20:21:54 -05:00
test_quotas.py Handle COPY verb in container quota middleware 2014-02-04 12:30:20 +01:00
test_ratelimit.py Add a way to ratelimit all writes to an account 2014-01-29 14:08:19 -08:00
test_recon.py Remove trailing slash for consistency 2014-01-06 18:12:42 -05:00
test_slo.py Support If-[None-]Match for object HEAD, SLO, and DLO 2014-02-20 14:54:26 -08:00
test_staticweb.py Improve StaticWeb 404 on web-listings/index 2014-02-18 11:46:31 +00:00
test_tempauth.py Privileged acct ACL header, new ACL syntax, TempAuth impl. 2014-01-29 13:02:54 -08:00
test_tempurl.py Expose allowed tempurl methods in /info 2013-12-12 16:13:42 -08:00