Can't do 'Transfer-Encoding: chunked'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Large objects are never sent using chunked transfers because response.
FWIW I'm using gluster's version with their plug-ins patched in. I don't believe that affects this issue.
Looking at the rest of the swift code and .../site-
This was found in 1.4.8 but looking at 1.6.0 source I can see the bug appears to exist there as well.
With the following change large objects are sent using chunked transfer (verified both with and without using tcpdump)
I chose to keep things simple and do chunk transfers at the disk_chunk_size, but an option in the config file would be okay too.
*** swift/obj/
--- swift/obj/server.py 2012-09-05 10:32:38.788003438 -0400
***************
*** 720,730 ****
! response.
! if response.
! 'X-Auth-Token' not in request.headers and \
! 'X-Storage-Token' not in request.headers:
! file.keep_cache = True
if 'Content-Encoding' in file.metadata:
--- 720,731 ----
! if file_size <= self.disk_
! response.
! if response.
! 'X-Auth-Token' not in request.headers and \
! 'X-Storage-Token' not in request.headers:
! file.keep_cache = True
if 'Content-Encoding' in file.metadata:
I'm a little confused as to what is broken. If the object server always sends with a content-length that is correct, what's the problem? Why does it *need* to use chunked transfer encoding if it knows the content length anyway?