You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2013/01/21 12:18:50 UTC
[29/50] [abbrv] git commit: ApiServer: Fix default reponse type for
apiserver on intergration port to xml
ApiServer: Fix default reponse type for apiserver on intergration port to xml
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/f264571e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/f264571e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/f264571e
Branch: refs/heads/cloud-agent-with-openvswitch
Commit: f264571e928cdbe73c8ab41be50d9df79c9c8663
Parents: f1d7d96
Author: Rohit Yadav <bh...@apache.org>
Authored: Thu Jan 17 17:02:58 2013 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Thu Jan 17 17:03:27 2013 -0800
----------------------------------------------------------------------
server/src/com/cloud/api/ApiServer.java | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f264571e/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index fc197b9..33ae007 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -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