DaanHoogland commented on code in PR #6393:
URL: https://github.com/apache/cloudstack/pull/6393#discussion_r878023852


##########
server/src/main/java/com/cloud/api/ApiServlet.java:
##########
@@ -186,22 +193,30 @@ void processRequestInContext(final HttpServletRequest 
req, final HttpServletResp
         }
 
         try {
-
-            if (HttpUtils.RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
-                resp.setContentType(ApiServer.JSONcontentType.value());
-            } else if 
(HttpUtils.RESPONSE_TYPE_XML.equalsIgnoreCase(responseType)){
-                resp.setContentType(HttpUtils.XML_CONTENT_TYPE);
-            }
+            resp.setContentType(HttpUtils.XML_CONTENT_TYPE);

Review Comment:
   It wouldn´t matter in the existing code as line 179 (former version 168) 
https://github.com/apache/cloudstack/pull/6393/files#diff-cc92beff292fdad7835437d622159db6e1ae90d0ebac7fb4ae73c813faa8896eR179
 hard-codes the `reponseType` to `HttpUtils.RESPONSE_TYPE_XML`.  The second 
branch would always be executed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to