New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: make sending Content-Length in 204 and 304 responses controllable #10156

Merged
merged 1 commit into from Feb 17, 2017

Conversation

Projects
None yet
4 participants
@rzarzynski
Contributor

rzarzynski commented Jul 6, 2016

No description provided.

@wido

This comment has been minimized.

Member

wido commented Jul 6, 2016

Always nasty to violate RFCs, but understandable. In which situation is this required?

Code looks good to me.

@rzarzynski

This comment has been minimized.

Contributor

rzarzynski commented Jul 6, 2016

@wido: thanks for the review. We need the configurable to pass RefStack due to the following test case:

tempest.api.object_storage.test_object_services.ObjectTest.test_delete_object

You might also want to take a look on the PR #9188. Anyway, I'm putting the DNM tag. There is a new hope for fixing the issue in Tempest.

@rzarzynski rzarzynski changed the title from rgw: make sending Content-Length in 204 and 304 responses controllable to [DNM] rgw: make sending Content-Length in 204 and 304 responses controllable Jul 6, 2016

@wido

This comment has been minimized.

Member

wido commented Jul 6, 2016

Ok, great! I wouldn't want to encourage people to violate RFCs, they are there for a reason.

Don't mind if this gets merged though.

@rzarzynski rzarzynski changed the title from [DNM] rgw: make sending Content-Length in 204 and 304 responses controllable to rgw: make sending Content-Length in 204 and 304 responses controllable Jul 19, 2016

@yehudasa

This comment has been minimized.

Member

yehudasa commented Oct 4, 2016

@rzarzynski do we still need this?

@rzarzynski

This comment has been minimized.

Contributor

rzarzynski commented Oct 5, 2016

@yehudasa: fortunately no :-) as our fix in Tempest has been merged. I will push 93629c0 in a separated pull request. Closing this one.

@rzarzynski rzarzynski closed this Oct 5, 2016

@mattbenjamin mattbenjamin reopened this Feb 16, 2017

rgw: make sending Content-Length in 204 and 304 controllable
This commit introduces a new configurable "rgw print prohibited
content length" to let operator decide whether RadosGW complies
to RFC 7230 (a part of the HTTP specification) or violates it
but follows the Swift's behavior.

Fixes: http://tracker.ceph.com/issues/16602
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>

@rzarzynski rzarzynski changed the title from rgw: make sending Content-Length in 204 and 304 responses controllable to [DNM] rgw: make sending Content-Length in 204 and 304 responses controllable Feb 17, 2017

@rzarzynski

This comment has been minimized.

Contributor

rzarzynski commented Feb 17, 2017

@mattbenjamin: I've just pushed a version ported to current master. DNM till testing on the morning.

@rzarzynski

This comment has been minimized.

Contributor

rzarzynski commented Feb 17, 2017

@mattbenjamin:

Manual testing:

  • For rgw_print_prohibited_content_length = false (default):
$ curl -i "${publicURL}/cont/obj10" -X DELETE -H "X-Auth-Token: ${token}" 
HTTP/1.1 204 No Content
X-Trans-Id: tx00000000000000000000b-0058a6eb39-1018-default
Content-Type: text/plain; charset=utf-8
Date: Fri, 17 Feb 2017 12:23:21 GMT

  • For rgw_print_prohibited_content_length = true:
$ curl -i "${publicURL}/cont/obj10" -X DELETE -H "X-Auth-Token: ${token}" 
HTTP/1.1 204 No Content
X-Trans-Id: tx000000000000000000010-0058a6ea8c-1015-default
Content-Type: text/plain; charset=utf-8
Content-Length: 0
Date: Fri, 17 Feb 2017 12:20:28 GMT

However, Tempest has found a regression in tempest.api.object_storage.test_container_services.ContainerTest.test_list_container_contents_with_end_marker. However, most likely it is unrelated to the change. I'm working on this.

@mattbenjamin mattbenjamin self-assigned this Feb 17, 2017

@mattbenjamin mattbenjamin changed the title from [DNM] rgw: make sending Content-Length in 204 and 304 responses controllable to rgw: make sending Content-Length in 204 and 304 responses controllable Feb 17, 2017

@rzarzynski

This comment has been minimized.

Contributor

rzarzynski commented Feb 17, 2017

@mattbenjamin: definitely the regression in Tempest is unrelated to the change.

@rzarzynski

This comment has been minimized.

Contributor

rzarzynski commented Feb 17, 2017

Created a ticket to track the issue: http://tracker.ceph.com/issues/18977.

@mattbenjamin

the change appears logically and trivially correct; it's 100/200 subset rgw suite run has failures which are clearly unrelated, merging to avoid schedule impact

@mattbenjamin mattbenjamin merged commit 408053a into ceph:master Feb 17, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment