Project

General

Profile

Actions

Bug #10683

closed

RGW swift API: GET request for container/object with query parameter limit=0 does not return expected output

Added by Ahmad Faheem about 9 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
% Done:

0%

Source:
Q/A
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

if value of query parameter "limit" is 0 rgw behaves as if limit parameter is not provided in GET query for container or object. for other positive values it works as expected.

Steps to reproduce:

1. swift post container1
2. swift post container2
3. swift post container3
4. swift post container4
5. curl -i "https://10.20.20.15:80/swift/v1?limit=0" -X GET -H "x-auth-token: 19aacea65f034c4eb1b17b79875313b3"

HTTP/1.1 200 OK
Date: Thu, 29 Jan 2015 08:30:16 GMT
Server: Apache/2.4.7 (Ubuntu)
Vary: Accept-Encoding
Access-Control-Allow-Origin: *
Content-Type: application/octet-stream
Connection: close
Transfer-Encoding: chunked

container1
container2
container3
container4

The same behavior is observed when combined with other query parameters like "marker".

In swift if same query is run it returns empty body.
curl -i http://10.0.2.15:8080/v1/AUTH_b2419ea9588d49ddbd8c006b5eb199ff?limit=0 -X GET -H "X-Auth-Token: 016649e57fdf4c26998d5a68f5ef214d"

HTTP/1.1 204 No Content
Content-Length: 0
X-Account-Object-Count: 4
X-Account-Storage-Policy-Policy-0-Bytes-Used: 1048582
X-Account-Storage-Policy-Policy-0-Container-Count: 5
X-Timestamp: 1419480678.41198
X-Account-Storage-Policy-Policy-0-Object-Count: 4
X-Account-Meta-Temp-Url-Key: secret
X-Account-Bytes-Used: 1048582
X-Account-Container-Count: 5
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
x-account-project-domain-id: default
X-Trans-Id: txec9ba5c0473d400ebda67-0054c8b8a5
Date: Wed, 28 Jan 2015 10:23:33 GMT

Actions #1

Updated by Radoslaw Zarzynski about 9 years ago

  • Status changed from New to In Progress
  • Assignee set to Radoslaw Zarzynski

I'm working on that.

Actions #2

Updated by Radoslaw Zarzynski about 9 years ago

  • Status changed from In Progress to Fix Under Review
Actions #3

Updated by Casey Bodley about 4 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF