Project

General

Profile

Bug #10971

RGW does not send Content-Length HTTP header in response for GET on Swift account/container when the FCGI frontend is used

Added by Radoslaw Zarzynski almost 9 years ago. Updated over 8 years ago.

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

0%

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

Description

The Content-Length header is mandatory according to OpenStack Object Storage API v1: http://docs.openstack.org/api/openstack-object-storage/1.0/content/GET_showContainerDetails__v1__account___container__storage_container_services.html.

The problem is absent while using the civetweb front-end due to extra level of buffering which allows to properly calculate and append the header when a given RGWOp does not generate it. Please take a look on RGWMongoose::write_data(), RGWMongoose::complete_header() and RGWMongoose::complete_request() methods

1. RGW via civetweb: curl -i http://localhost:8000/swift/v1/cont -X GET -H "X-Auth-Token: $token"

HTTP/1.1 200 OK
Content-type: text/plain; charset=utf-8
Content-Length: 5

file

2. RGW via nginx: curl -i http://localhost:8080/swift/v1/cont -X GET -H "X-Auth-Token: $token"

HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Fri, 27 Feb 2015 12:55:53 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive

file

Associated revisions

Revision 5a64fb54 (diff)
Added by Radoslaw Zarzynski over 8 years ago

rgw: send Content-Length in response for GET on Swift container.

Fixes: #10971
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <>

Revision 8e6efdbc (diff)
Added by Radoslaw Zarzynski over 8 years ago

rgw: send Content-Length in response for GET on Swift container.

Fixes: #10971
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <>
(cherry picked from commit 5a64fb5430b6b42174bf53a5910d9435043c1380)

Revision 0a580c4a (diff)
Added by Radoslaw Zarzynski over 8 years ago

rgw: send Content-Length in response for GET on Swift container.

Fixes: #10971
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <>
(cherry picked from commit 5a64fb5430b6b42174bf53a5910d9435043c1380)

History

#1 Updated by Radoslaw Zarzynski almost 9 years ago

I'm currently working on that.

#2 Updated by Radoslaw Zarzynski almost 9 years ago

Pull request: https://github.com/ceph/ceph/pull/3863 (also contains commits for #11036).

#3 Updated by Radoslaw Zarzynski over 8 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Radoslaw Zarzynski

#4 Updated by Yehuda Sadeh over 8 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to hammer

Merged fix in commit:5a64fb5430b6b42174bf53a5910d9435043c1380

When backporting, we'll also need to have commit:f98fd4dfda7a105d621f99c2b48eb9ab9b45d979

#6 Updated by Loïc Dachary over 8 years ago

  • Status changed from Pending Backport to Resolved
  • Regression set to No

Also available in: Atom PDF