Skip to content

Commit f264571

Browse files
committed
ApiServer: Fix default reponse type for apiserver on intergration port to xml
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent f1d7d96 commit f264571

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎server/src/com/cloud/api/ApiServer.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public void handle(HttpRequest request, HttpResponse response, HttpContext conte
256256
// (Immutable)Multimap<String, String> paramMultiMap = HashMultimap.create();
257257
// Map<String, Collection<String>> parameterMap = paramMultiMap.asMap();
258258
Map parameterMap = new HashMap<String, String[]>();
259-
String responseType = BaseCmd.RESPONSE_TYPE_JSON;
259+
String responseType = BaseCmd.RESPONSE_TYPE_XML;
260260
for (NameValuePair param : paramList) {
261261
if (param.getName().equalsIgnoreCase("response")) {
262262
responseType = param.getValue();
@@ -267,7 +267,7 @@ public void handle(HttpRequest request, HttpResponse response, HttpContext conte
267267

268268
// Check responseType, if not among valid types, fallback to JSON
269269
if (!(responseType.equals(BaseCmd.RESPONSE_TYPE_JSON) || responseType.equals(BaseCmd.RESPONSE_TYPE_XML)))
270-
responseType = BaseCmd.RESPONSE_TYPE_JSON;
270+
responseType = BaseCmd.RESPONSE_TYPE_XML;
271271

272272
try {
273273
// always trust commands from API port, user context will always be UID_SYSTEM/ACCOUNT_ID_SYSTEM

0 commit comments

Comments
 (0)