Project

General

Profile

Bug #18473

radosgw swift: error messages: spurious newline after http body causes weird errors.

Added by Marcus Watts 11 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
01/10/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
kraken,jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
jewel
Needs Doc:
No

Description

The swift support in go (github.com/ncw/swift) is pickier about http, it checks for incorrect behavior and complains, as is its right.

The swift support in radosgw emits spurious newlines after errors. Actually, it seems to do it for success too. Not sure if the newline is ever a good idea, but if it is, it should be properly accounted for when setting "content-length". If the newline is a bad thing, then it needs to go away. There's some thought that the newline should be a crlf, which is possible but a strict reading of RFC 2616 suggests this shouldn't be a strict requirement.

This bug isn't visible using curl, because everything looks "correct" until the client tries to read past the end of the output from the request, and curl doesn't do that. Apparently the python swift code also doesn't care.

I tested with 'master', but the bug may have been there since 2013 and I think was originally reported in jewel.


Related issues

Copied to rgw - Backport #18780: kraken: radosgw swift: error messages: spurious newline after http body causes weird errors. Resolved
Copied to rgw - Backport #18781: jewel: radosgw swift: error messages: spurious newline after http body causes weird errors. Resolved

History

#1 Updated by Marcus Watts 11 months ago

I've got a patch that fixes this problem. https://github.com/ceph/ceph/pull/12895 It passes "swiftests" and "s3-tests".

#2 Updated by Marcus Watts 11 months ago

I've made a pull request for jewel that addresses this.
https://github.com/ceph/ceph/pull/12899
Nothing special about this; same code as master, so the patch from master applies without complications on jewel.

#3 Updated by Nathan Cutler 11 months ago

  • Status changed from New to Need Review
  • Backport set to kraken,jewel

#4 Updated by Nathan Cutler 10 months ago

  • Status changed from Need Review to Pending Backport

#5 Updated by Nathan Cutler 10 months ago

  • Copied to Backport #18780: kraken: radosgw swift: error messages: spurious newline after http body causes weird errors. added

#6 Updated by Nathan Cutler 10 months ago

  • Copied to Backport #18781: jewel: radosgw swift: error messages: spurious newline after http body causes weird errors. added

#7 Updated by Nathan Cutler 6 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF