Swift HEAD request does not response with right content length
Bug #1161891 reported by
Tong Li
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Swift HEAD request against a segmented object will return content length of zero. The real content length should be returned.
a patch which contains a query into container object table will return the correct content length.
SELECT sum(size) as content_length
this will not generate a lot of traffic and it is only a database query which will return right length for segmented objects.
Changed in swift: | |
assignee: | Tong Li (litong01) → nobody |
To post a comment you must log in.
I do not think this is a good idea. Currently the content length in the HEAD response is, in fact, the length of the manifest object.
Consider a 1024-byte object named /a/c/o. A response to "HEAD /v1/a/c/o" will tell me that the Content-Length is 1024.
If I change the value of Content-Type, then the Content-Length remains 1024. Meta-Owners- Dogs-Favorite- Kibble, then the Content-Length remains 1024.
If I change the value of X-Delete-At, then the Content-Length remains 1024.
If I change the value of X-Object-
If I change the value of X-Object-Manifest, the Content-Length changes to some other number? That seems crazy IMHO.
Updating an object's metadata doesn't affect the actual data, so headers describing the actual data, like Content-Length and Etag, shouldn't be affected by a metadata change.