Bug 1039770

Summary: rest: html returned when receiving 404 from responses expecting xml
Product: Red Hat Gluster Storage Reporter: Dustin Tsang <dtsang>
Component: rhsc-sdkAssignee: Shubhendu Tripathi <shtripat>
Status: CLOSED WONTFIX QA Contact: Mike McCune <mmccune>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.1CC: dpati, knarra, mmahoney, mmccune, rhs-bugs, ssampat
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: 2015-08-31 10:10:19 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:

Description Dustin Tsang 2013-12-09 23:03:45 UTC
Description of problem:

When the a rest request is made that accepts 'application/xml' (http header includes key:value of Accept:application/xml)
and the response is a 404
The returned response body is html and not xml.

------- sample request-----
POST /api/clusters/73bc65ff-d43d-43a9-9936-235dc2a083e1/glustervolumes/thisisafakeid/rebalance HTTP/1.1
Content-Type: application/xml
Accept: application/xml
Content-Length: 10
Host: latest.rhsc:443
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.3 (java 1.5)
Authorization: Basic YWRtaW5AaW50ZXJuYWw6cmVkaGF0
"<action />"
"HTTP/1.1 404 Not Found[\r][\n]"
"Date: Mon, 09 Dec 2013 22:46:38 GMT[\r][\n]"
"Content-Type: text/html;charset=utf-8[\r][\n]"
"Content-Length: 1060[\r][\n]"
"Vary: Accept-Encoding[\r][\n]"
"Connection: close[\r][\n]"
"[\r][\n]"



Version-Release number of selected component (if applicable):
rhsc-cb10

How reproducible:
100% of the time

Steps to Reproduce:
1. in rhsc, create a cluster  
2. create a post request to rebalance a volume with a fake id.
(POST /api/clusters/73bc65ff-d43d-43a9-9936-235dc2a083e1/glustervolumes/thisisafakeid/rebalance HTTP/1.1)

Actual results:


HTTP/1.1 404 Not Found                                                                                                                                                                                         
Date: Mon, 09 Dec 2013 22:46:38 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 1060
Vary: Accept-Encoding
Connection: close
"<html><head><title>JBoss Web/7.2.2.Final-redhat-1-  JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,    sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:   12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 404  -  </h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u></u></p><p><b>JBWEB000069: description</b> <u>JBWEB000124: The requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.2.2.Final-redhat-1</h3></body></html>"
Connection shut down



Expected results:
response with xml in the body

Additional info:

Comment 4 Dusmant 2015-08-31 10:10:19 UTC
We are not planning to fix it. Hence closing this BZ. If you think, it's applicable for 3.x release and would have an impact on customer, pls. open up a new BZ with the appropriate version. Thanks, -Dusmant