Project

General

Profile

Actions

Bug #18473

closed

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

Added by Marcus Watts over 7 years ago. Updated almost 7 years ago.

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

0%

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

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 2 (0 open2 closed)

Copied to rgw - Backport #18780: kraken: radosgw swift: error messages: spurious newline after http body causes weird errors.ResolvedNathan CutlerActions
Copied to rgw - Backport #18781: jewel: radosgw swift: error messages: spurious newline after http body causes weird errors.ResolvedMatt BenjaminActions
Actions #1

Updated by Marcus Watts over 7 years ago

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

Actions #2

Updated by Marcus Watts over 7 years 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.

Actions #3

Updated by Nathan Cutler over 7 years ago

  • Status changed from New to Fix Under Review
  • Backport set to kraken,jewel
Actions #4

Updated by Nathan Cutler about 7 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

Updated by Nathan Cutler about 7 years ago

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

Updated by Nathan Cutler about 7 years ago

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

Updated by Nathan Cutler almost 7 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF