swift/test
Kota Tsuyuzaki 99d052772a Fix 499 client disconnected on COPY EC object
Currently, a COPY request for an EC object might go to fail as 499 Client
disconnected because of the difference between destination request content
length and actual transferred bytes.

That is because the conditional response status and content length for
an EC object range GET is handled at calling the response instance on
proxy server. Therefore the calling response instance (resp()) will change
the conditional status from 200 (HTTP_OK) to 206 (PartialContent) and will
change the content length for the range GET.

In EC case, sometimes Swift needs whole stored contents to decode a segment.
It will make 200 HTTP OK response from object-server and proxy-server
will unfortunately set whole content length to the destination content
length and it makes the bug 1467677.

This patch introduces a new method "fix_conditional_response" for
swift.common.swob.Response that calling _response_iter() and cached the
iter in the Response instance. By calling it, Swift can set correct condtional
response any time after setting whole content_length to the response
instance like EC case.

Change-Id: If85826243f955d2f03c6ad395215c73daab509b1
Closes-Bug: #1467677
2015-07-22 02:01:32 -07:00
..
functional Fix 499 client disconnected on COPY EC object 2015-07-22 02:01:32 -07:00
probe Merge "Replace dict.iteritems() with dict.items()" 2015-07-09 18:36:05 +00:00
unit Fix 499 client disconnected on COPY EC object 2015-07-22 02:01:32 -07:00
__init__.py In-process swift server for functional tests 2014-04-29 08:45:11 -04:00
sample.conf Minor change to the service token sample test config 2015-02-27 11:54:50 +00:00