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
Operations

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

[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 11:47 PM]
Thanks for clarifying the issue. This is a bug and will be fixed soon.

Bin Wu [18/Jan/22 02:34 PM]
Try API:
/rest/builds/count?configuration_id=3325&from_date=2022-1-16&to_date=2022-1-18
with 'application/json'
=======
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<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>
</body>
</html>

without 'application/json'
======
2

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.