Bug 1385485

Summary: 404 ends in \n instead of \r\n, causing errors in some libraries
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: JuanJose Galvez <jgalvez>
Component: RGWAssignee: Marcus Watts <mwatts>
Status: CLOSED ERRATA QA Contact: shilpa <smanjara>
Severity: medium Docs Contact:
Priority: high    
Version: 2.1CC: cbodley, ceph-eng-bugs, ceph-qe-bugs, hnallurv, kbader, kdreyer, mbenjamin, mmuir, mwatts, owasserm, smanjara, sweil, uboppana
Target Milestone: rc   
Target Release: 2.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-10.2.5-13.el7cp Ubuntu: ceph_10.2.5-7redhat1xenial Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-14 15:45:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Wireshark showing \n instead of \r\n at end of 404 response none

Description JuanJose Galvez 2016-10-17 07:44:57 UTC
Created attachment 1211237 [details]
Wireshark showing \n instead of \r\n at end of 404 response

Description of problem:

The Go (1.7.1) language net.http library is strict and is throwing an error when an extra \n is returned by the radosgw. We can find the extra \n at the end of a 404. Please see the attached image.

Steps to Reproduce:
1. Access a 404 response from the radosgw
2. See the extra \n at the end of the response.

Actual results:

\n is an invalid ending, causing an error in strict language libraries. In Go's net.http library the following error is seen:

Unsolicited response received on idle HTTP channel starting with "\n"; err=<nil>

Expected results:

\r\n would be considered valid.

Comment 15 Matt Benjamin (redhat) 2017-01-26 20:20:32 UTC
Fix merged to upstream as 

commit 5f229d6a33eae4906f22cdb90941835e47ee9f02
Author: Marcus Watts <mwatts>
Date:   Wed Jan 11 00:06:15 2017 -0500

    radosgw/swift: clean up flush / newline behavior.

Scheduled for jewel backport.

Comment 26 shilpa 2017-02-22 09:05:25 UTC
Verified on 10.2.5-27

Comment 28 errata-xmlrpc 2017-03-14 15:45:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0514.html