summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at/gv/egiz/bku/binding
diff options
context:
space:
mode:
authorwbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-03-13 07:49:49 +0000
committerwbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-03-13 07:49:49 +0000
commit2882e14d19cfa58ea382083434210aaf0cfea3e3 (patch)
tree55aca764e9655556b05260e339ac86edce180886 /bkucommon/src/main/java/at/gv/egiz/bku/binding
parent7cc403b3ce468e82a57811336def347cb6c9025e (diff)
downloadmocca-2882e14d19cfa58ea382083434210aaf0cfea3e3.tar.gz
mocca-2882e14d19cfa58ea382083434210aaf0cfea3e3.tar.bz2
mocca-2882e14d19cfa58ea382083434210aaf0cfea3e3.zip
Fixed Bug#405 and added according test case
Fixed Bug#402 Added Feature#403 git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@320 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/main/java/at/gv/egiz/bku/binding')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java16
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java4
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java3
3 files changed, 16 insertions, 7 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java
index 4c235456..c8bddbbd 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java
@@ -225,10 +225,17 @@ public class DataUrlConnectionImpl implements DataUrlConnectionSPI {
this.url = url;
boundary = "--" + IdFactory.getInstance().createId().toString();
requestHttpHeaders = new HashMap<String, String>();
- if ((config != null)
- && (config.getProperty(Configurator.USERAGENT_CONFIG_P) != null)) {
- requestHttpHeaders.put(HttpUtil.HTTP_HEADER_USER_AGENT, config
- .getProperty(Configurator.USERAGENT_CONFIG_P));
+
+ if (config != null) {
+ String sigLayout="";
+ String version = config.getProperty(Configurator.SIGNATURE_LAYOUT);
+ if ((version != null) && (!"".equals(version.trim()))) {
+ requestHttpHeaders.put(Configurator.SIGNATURE_LAYOUT, version);
+ } else {
+ log.debug("Do not set siglayout header");
+ }
+ String userAgent = config.getProperty(Configurator.USERAGENT_CONFIG_P, Configurator.USERAGENT_DEFAULT);
+ requestHttpHeaders.put(HttpUtil.HTTP_HEADER_USER_AGENT, userAgent);
} else {
requestHttpHeaders
.put(HttpUtil.HTTP_HEADER_USER_AGENT, Configurator.USERAGENT_DEFAULT);
@@ -251,6 +258,7 @@ public class DataUrlConnectionImpl implements DataUrlConnectionSPI {
DataUrlConnectionSPI uc = new DataUrlConnectionImpl();
uc.setConfiguration(config);
uc.setSSLSocketFactory(sslSocketFactory);
+ uc.setHostnameVerifier(hostnameVerifier);
return uc;
}
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java
index 43f42331..d0b2dac1 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java
@@ -672,10 +672,10 @@ public class HTTPBindingProcessor extends AbstractBindingProcessor implements
} else {
FormParameterStore fps = new FormParameterStore();
fps.init(fp);
- if (!fps.isEmpty()) {
+ //if (!fps.isEmpty()) {
log.debug("Setting form parameter: " + fps.getFormParameterName());
formParameterMap.put(fps.getFormParameterName(), fps);
- }
+ //}
}
}
if (slCommand == null) {
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java
index b11a4d85..5ea7b25e 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java
@@ -29,7 +29,8 @@ public class HttpUtil {
public final static String CHAR_SET = "charset";
public final static String DEFAULT_CHARSET = "ISO-8859-1";
public final static String HTTP_HEADER_CONTENT_TYPE = "Content-Type";
- public static final String HTTP_HEADER_USER_AGENT = "User-Agent";
+ public static final String HTTP_HEADER_USER_AGENT = "User-Agent";
+ public static final String HTTP_HEADER_SERVER = "Server";
public final static String HTTP_HEADER_REFERER = "Referer";
public final static String CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding";
public final static String MULTIPART_FOTMDATA = "multipart/form-data";