aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrudolf <rudolf@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-03-23 11:46:07 +0000
committerrudolf <rudolf@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-03-23 11:46:07 +0000
commit78517cac347d7b892fd5fc0748b02f0220168577 (patch)
treedf215d201b63973f1ea07c413718061c31984de7
parent470880b74b8be774f3c3fd52545b8fe3f2dbb465 (diff)
downloadmoa-id-spss-78517cac347d7b892fd5fc0748b02f0220168577.tar.gz
moa-id-spss-78517cac347d7b892fd5fc0748b02f0220168577.tar.bz2
moa-id-spss-78517cac347d7b892fd5fc0748b02f0220168577.zip
URLEncoding für ParamAuth Methode wurde hinzugefügt (Methode: appendQueryString)
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@274 d688527b-c9ab-4aba-bd8d-4036d912da1d
-rw-r--r--id.server/src/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/id.server/src/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java b/id.server/src/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java
index 7807955c2..5ded393d1 100644
--- a/id.server/src/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java
+++ b/id.server/src/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java
@@ -1,8 +1,10 @@
package at.gv.egovernment.moa.id.proxy;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
+import java.net.URLEncoder;
import java.util.Iterator;
import java.util.Map;
@@ -89,9 +91,15 @@ public class DefaultConnectionBuilder implements ConnectionBuilder {
*/
private String appendQueryString(String requestedURL, Map parameters) {
String newURL = requestedURL;
+ String paramValue ="";
+ String paramName ="";
for (Iterator iter = parameters.keySet().iterator(); iter.hasNext();) {
- String paramName = (String)iter.next();
- String paramValue = (String)parameters.get(paramName);
+ try {
+ paramName = URLEncoder.encode((String) iter.next(), "UTF-8");
+ paramValue = URLEncoder.encode((String) parameters.get(paramName), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ //UTF-8 should be supported
+ }
String paramString = paramName + "=" + paramValue;
if (newURL.indexOf("?") < 0)
newURL = newURL + "?" + paramString;