History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3826
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: Bin Wu
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

[Restful][Json format] Content-Type format alway is 'application/json'

Created: 18/Jan/22 06:16 AM   Updated: 19/Jan/22 12:07 AM
Component/s: None
Affects Version/s: 11.0.26
Fix Version/s: 11.0.31

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: run 11.0.26 in docker image: openjdk:11-jdk

 Description  « Hide
we are glad to know QB support json format from v10
we try the json format result, but here catch a different behavior with XML format
with default header, we will receive the 'Content-Type' is 'application/xml' or 'text/plain'
But when we try the json header, just receive 'application/json'

So the problem is access some 'text/plain' like 'rest/version' receive type also is 'application/json'

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [18/Jan/22 10:30 AM]
This is expected. If call with header "Accept: application/json", QB will always try to send output in json format.

Bin Wu [18/Jan/22 02:34 PM]
Try API:
with 'application/json'
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /rest/builds/count. Reason:
<pre> Server Error</pre></p>
<hr /><i><small>Powered by Jetty://&lt;/small&gt;&lt;/i>

without 'application/json'

Robin Shen [18/Jan/22 11:47 PM]
Thanks for clarifying the issue. This is a bug and will be fixed soon.