From 4a9a8b602719d3d6b8a099ceca2f5cbe8d9cce26 Mon Sep 17 00:00:00 2001 From: Felipe Barriga Richards Date: Thu, 9 Feb 2017 15:42:59 -0300 Subject: [PATCH] XMLRPCClient: Add FIXME comment. --- app/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java b/app/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java index 0a88100b..f6003f87 100644 --- a/app/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java +++ b/app/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java @@ -9,6 +9,7 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.params.ClientPNames; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.protocol.HTTP; @@ -356,7 +357,7 @@ public class XMLRPCClient { * Read the README file delivered with the source code of this library for more * information. * - * @param method A method name to call. + * @param methodName A method name to call. * @param params An array of parameters for the method. * @return The result of the server. * @throws XMLRPCException Will be thrown if an error occurred during the call. @@ -369,8 +370,9 @@ public class XMLRPCClient { Call c = createCall(methodName, params); // Prepare POST request + // FIXME: where creating a new HttpPost so calling #cancel isn't going to do anything HttpPost post = new HttpPost(url); - post.getParams().setParameter("http.protocol.handle-redirects", false); + post.getParams().setParameter(ClientPNames.HANDLE_REDIRECTS, false); post.setHeader(CONTENT_TYPE, TYPE_XML); StringEntity entity = new StringEntity(c.getXML(), HTTP.UTF_8); entity.setContentType(TYPE_XML);