Bug #10666
closed
RGW swift API: Response header of GET request for container does not contain X-Container-Object-Count, X-Container-Bytes-Used and x-trans-id headers
Added by Ahmad Faheem over 9 years ago.
Updated almost 9 years ago.
Description
In swift response returned by GET on container:
curl -i http://10.0.2.15:8080/v1/AUTH_b2419ea9588d49ddbd8c006b5eb199ff/container -X GET -H "X-Auth-Token: 1bdd9fd9c40845a3b4efb81d5d93abe3"
HTTP/1.1 200 OK
Content-Length: 29
X-Container-Object-Count: 5
Accept-Ranges: bytes
X-Storage-Policy: Policy-0
X-Container-Meta-Quota-Count: 10
X-Container-Bytes-Used: 2097158
X-Timestamp: 1422385210.05485
Content-Type: text/plain; charset=utf-8
X-Trans-Id: txc8180b27ba9243a2a99ec-0054c82ceb
Date: Wed, 28 Jan 2015 00:27:23 GMT
response returned by rgw:
curl -i https://10.20.20.15:80/swift/v1/container -X GET -H "X-Auth-Token: c12140163cce491e9aed7165796f1f02"
HTTP/1.1 200 OK
Date: Wed, 28 Jan 2015 10:29:00 GMT
Server: Apache/2.4.7 (Ubuntu)
Vary: Accept-Encoding
Access-Control-Allow-Origin: *
Content-Type: application/octet-stream
Connection: close
Transfer-Encoding: chunked
- Assignee set to Dmytro Yurchenko
- Status changed from New to In Progress
The issues are very alike but not the same.
I had some doubts if such query parameters as 'prefix' affect the headers like 'X-Container-Object-Count', because the docs are not clear.
I thought it is possible that Swift returns the amount of objects retrieved in response and in 'X-Container-Bytes-Used' could be a sum of their sizes.
But tests showed that these headers should not be affected by query parameters:
curl -i "http://172.16.0.2:8080/v1/AUTH_f76a8a92c0ad49c2809195ffcb6582c9/cont1" -X GET
HTTP/1.1 200 OK
Content-Length: 31
X-Container-Object-Count: 3
Accept-Ranges: bytes
X-Storage-Policy: Policy-0
X-Container-Bytes-Used: 3782499
X-Timestamp: 1423824771.91127
Content-Type: text/plain; charset=utf-8
X-Trans-Id: txb257f9a142b84d6997e17-0054dddd3f
Date: Fri, 13 Feb 2015 11:17:19 GMT
pic1.jpg
space1.jpg
space2.jpg
curl -i "http://172.16.0.2:8080/v1/AUTH_f76a8a92c0ad49c2809195ffcb6582c9/cont1? prefix=space " -X GET
HTTP/1.1 200 OK
Content-Length: 22
X-Container-Object-Count: 3
Accept-Ranges: bytes
X-Storage-Policy: Policy-0
X-Container-Bytes-Used: 3782499
X-Timestamp: 1423824771.91127
Content-Type: text/plain; charset=utf-8
X-Trans-Id: tx5825425c47d340cf90305-0054dddd83
Date: Fri, 13 Feb 2015 11:18:27 GMT
space1.jpg
space2.jpg
- Status changed from In Progress to Fix Under Review
- Status changed from Fix Under Review to Pending Backport
- Backport set to hammer
- Status changed from Pending Backport to Resolved
Also available in: Atom
PDF