diff options
author | Vincent Lucas <chenzo@jitsi.org> | 2012-06-04 17:38:44 +0000 |
---|---|---|
committer | Vincent Lucas <chenzo@jitsi.org> | 2012-06-04 17:38:44 +0000 |
commit | e35c33f59a81dfd23f9c63bbc6b395283ada0b35 (patch) | |
tree | 80829a52530cc57e84c264ca938380e5dd1d0f8e /src/net/java/sip/communicator/service | |
parent | 1ffcb1c2ddb5bf5859e9e4cc42c81b309951962e (diff) | |
download | jitsi-e35c33f59a81dfd23f9c63bbc6b395283ada0b35.zip jitsi-e35c33f59a81dfd23f9c63bbc6b395283ada0b35.tar.gz jitsi-e35c33f59a81dfd23f9c63bbc6b395283ada0b35.tar.bz2 |
Replaces incorrect provisioning parameters, which do not correspond to
"name=value": i.e. "name" is replaced by "name=".
Diffstat (limited to 'src/net/java/sip/communicator/service')
-rw-r--r-- | src/net/java/sip/communicator/service/httputil/HttpUtils.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/net/java/sip/communicator/service/httputil/HttpUtils.java b/src/net/java/sip/communicator/service/httputil/HttpUtils.java index 7c9f18e..2b92f3e 100644 --- a/src/net/java/sip/communicator/service/httputil/HttpUtils.java +++ b/src/net/java/sip/communicator/service/httputil/HttpUtils.java @@ -334,8 +334,8 @@ public class HttpUtils public static HTTPResponseResult postForm(String address, String usernamePropertyName, String passwordPropertyName, - String[] formParamNames, - String[] formParamValues, + ArrayList<String> formParamNames, + ArrayList<String> formParamValues, int usernameParamIx, int passwordParamIx) { @@ -437,8 +437,8 @@ public class HttpUtils String address, String usernamePropertyName, String passwordPropertyName, - String[] formParamNames, - String[] formParamValues, + ArrayList<String> formParamNames, + ArrayList<String> formParamValues, int usernameParamIx, int passwordParamIx) throws Throwable @@ -447,9 +447,9 @@ public class HttpUtils // retrieve their values Credentials creds = null; if(usernameParamIx != -1 - && usernameParamIx < formParamNames.length + && usernameParamIx < formParamNames.size() && passwordParamIx != -1 - && passwordParamIx < formParamNames.length) + && passwordParamIx < formParamNames.size()) { URL url = new URL(address); HTTPCredentialsProvider prov = (HTTPCredentialsProvider) @@ -477,23 +477,23 @@ public class HttpUtils // there can be no params if(formParamNames != null) { - for(int i = 0; i < formParamNames.length; i++) + for(int i = 0; i < formParamNames.size(); i++) { // we are on the username index, insert retrieved username value if(i == usernameParamIx && creds != null) { parameters.add(new BasicNameValuePair( - formParamNames[i], creds.getUserPrincipal().getName())); + formParamNames.get(i), creds.getUserPrincipal().getName())); }// we are on the password index, insert retrieved password val else if(i == passwordParamIx && creds != null) { parameters.add(new BasicNameValuePair( - formParamNames[i], creds.getPassword())); + formParamNames.get(i), creds.getPassword())); } else // common name value pair, all info is present { parameters.add(new BasicNameValuePair( - formParamNames[i], formParamValues[i])); + formParamNames.get(i), formParamValues.get(i))); } } } |