Bug 913796

Summary: HTTP response doesn't include description of http status
Product: OpenShift Online Reporter: jizhao
Component: MasterAssignee: Lili Nader <lnader>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: adietish, ccoleman, mfisher, szhou
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-17 17:56:14 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
yum update httpd none

Description jizhao 2013-02-22 05:33:26 UTC
Description of problem:
The http responses of rest api doesn't include description of http status. This happens on both stage(devenv-stage_301) and devenv_2845.

Version-Release number of selected component (if applicable):
stage(devenv-stage_301)
devenv_2845

How reproducible:
Always

Steps to Reproduce:
1.Use curl to check the http response
$ curl -i -u 'jizhao+4:redhat' -X GET -s -k https://<instance_dns>/broker/rest/domains
2.
3.
  
Actual results:
<-------------------http response header----------------------->
HTTP/1.1 200 
Date: Fri, 22 Feb 2013 05:29:20 GMT
Server: Apache/2.2.15 (Red Hat)
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.17
X-UA-Compatible: IE=Edge
ETag: "75e6402d53613a938f2e666abe980aca"
Cache-Control: must-revalidate, private, max-age=0
X-Request-Id: 26d5f08f0d3da5489131b98b1d3cbfbf
X-Runtime: 0.018719
X-Rack-Cache: miss
Status: 200
Content-Length: 115
Content-Type: application/json; charset=utf-8
Vary: Accept-Encoding,User-Agent
Strict-Transport-Security: max-age=15768000
ProxyTime: D=30450
<-------------------------------------------------------------->

Expected results:
The response should be:
HTTP/1.1 200 OK

Additional info:

Comment 1 Lili Nader 2013-02-25 19:12:38 UTC
I looked into this by launching an instance of devenv_2845 and indeed it does not return a HTTP status description.  I could not figure out what the cause of the problem.

This is also reproducible in latest devenv_2857.

Comment 2 Andre Dietisheim 2013-03-04 15:30:47 UTC
I read RFC 1945 in the sense that the reason phrase is optional (Section 6.1.1.). I therefore assume that the above response that only states the status code but wont give any reason phrase is perfectly valid. 
I tested with HttpUrlConnection which is used by openshift-java-client and has no issue with this kind of response.

Comment 3 Clayton Coleman 2013-03-04 15:56:51 UTC
It was only optional in httpd 2.4, and required in 2.0 and 2.2.

http://apache-http-server.18135.n6.nabble.com/Empty-Reason-Phrase-BZ-44995-45092-td4790180.html

I'm concerned about this breaking clients that assume it's there.  It's a regression in that sense.

Comment 4 Lili Nader 2013-03-05 01:27:15 UTC
Created attachment 705250 [details]
yum update httpd

Comment 5 Lili Nader 2013-03-05 01:32:33 UTC
Updating these packages caused the HTTP reason phrase to disappear.

Updated:
  httpd.x86_64 0:2.2.15-26.el6                                                            
httpd-tools.x86_64 0:2.2.15-26.el6                                                           

Dependency Updated:
  mod_ssl.x86_64 1:2.2.15-26.el6

Comment 6 jizhao 2013-03-05 08:51:21 UTC
In devenv_2895, the httpd version is still 2.2.15-26,
[root@ip-10-147-197-58 ~]# rpm -qa|grep httpd
httpd-tools-2.2.15-26.el6.x86_64
lighttpd-zend-server-1.4.26-0.x86_64
httpd-2.2.15-26.el6.x86_64
    
And the bug still exists in devenv_2895 and INT(devenv_2893)

If downgrading is the fix,  do we need to downgrading it from devenv built scripts and add a comment about this in the release tickets as well?

Comment 7 Lili Nader 2013-03-26 01:23:36 UTC
This is not my call.  If downgrade is necessary will have to let ops take care of it.