Bugfix: Do not URL-decode API parameters twice.

There's no need to call ApiServer's handleRequest with decode=true
since Tomcat has already url-decoded the parameters. URL-decoding
twice breaks all Base64 encoded data such as userData in deployVM,
since %2b decodes to ' ', not '+' as it should.
This commit is contained in:
Ragnar B. Johannsson 2011-01-06 14:25:59 +00:00
parent 32c68e1583
commit a013640180
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ public class ApiServlet extends HttpServlet {
auditTrailSb.insert(0, "(userId="+UserContext.current().getCallerUserId()+ " accountId="+UserContext.current().getCaller().getId()+ " sessionId="+(session != null ? session.getId() : null)+ ")" );
try {
String response = _apiServer.handleRequest(params, true, responseType, auditTrailSb);
String response = _apiServer.handleRequest(params, false, responseType, auditTrailSb);
writeResponse(resp, response != null ? response : "", HttpServletResponse.SC_OK, responseType);
} catch (ServerApiException se) {
String serializedResponseText = _apiServer.getSerializedApiError(se.getErrorCode(), se.getDescription(), params, responseType);