mirror of https://github.com/apache/cloudstack.git
ApiServer: Fix default reponse type for apiserver on intergration port to xml
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
f1d7d96414
commit
f264571e92
|
|
@ -256,7 +256,7 @@ public class ApiServer implements HttpRequestHandler {
|
|||
// (Immutable)Multimap<String, String> paramMultiMap = HashMultimap.create();
|
||||
// Map<String, Collection<String>> parameterMap = paramMultiMap.asMap();
|
||||
Map parameterMap = new HashMap<String, String[]>();
|
||||
String responseType = BaseCmd.RESPONSE_TYPE_JSON;
|
||||
String responseType = BaseCmd.RESPONSE_TYPE_XML;
|
||||
for (NameValuePair param : paramList) {
|
||||
if (param.getName().equalsIgnoreCase("response")) {
|
||||
responseType = param.getValue();
|
||||
|
|
@ -267,7 +267,7 @@ public class ApiServer implements HttpRequestHandler {
|
|||
|
||||
// Check responseType, if not among valid types, fallback to JSON
|
||||
if (!(responseType.equals(BaseCmd.RESPONSE_TYPE_JSON) || responseType.equals(BaseCmd.RESPONSE_TYPE_XML)))
|
||||
responseType = BaseCmd.RESPONSE_TYPE_JSON;
|
||||
responseType = BaseCmd.RESPONSE_TYPE_XML;
|
||||
|
||||
try {
|
||||
// always trust commands from API port, user context will always be UID_SYSTEM/ACCOUNT_ID_SYSTEM
|
||||
|
|
|
|||
Loading…
Reference in New Issue