Bug 972774 - result of GET reports.xml|json should take accept header into account
Summary: result of GET reports.xml|json should take accept header into account
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: REST
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Heiko W. Rupp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-10 14:48 UTC by Libor Zoubek
Modified: 2022-03-31 04:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Libor Zoubek 2013-06-10 14:48:46 UTC
Description of problem: When I have a REST client which understands JSON or XML and goes to /reports server returns a page with links to reports. Those reports only support .csv format. Client has no glue about that and when he follows those links, he get's 503 from server (because it sends "accepts : application/json")

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

How reproducible:always


Actual results:
1. do GET /rest/reports.html

server returns this:

 <li>
    <a href="http://localhost:7080/rest/reports/alertDefinitions.csv">alertDefinitions</a>
 </li>

2. do GET /rest/reports.xml

server returns this:
<link href="http://localhost:7080/rest/reports/alertDefinitions" rel="alertDefinitions"/>

then, if you do GET /rest/reports/alertDefinitions with "accept: application/xml" header, server returns 500

Expected results: We should either implement XML/JSON support for all reports or provide links, which are correct (possibly no links for client talking in XML)


Additional info:


Note You need to log in before you can comment on or make changes to this bug.