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:
Rohit Yadav 2013-01-17 17:02:58 -08:00
parent f1d7d96414
commit f264571e92
1 changed files with 2 additions and 2 deletions

View File

@ -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