summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2014-03-10 15:22:56 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2014-03-10 15:22:56 +0000
commit271a40ff1cf25c5eadf7a7f42e93fd85775a9ff7 (patch)
tree51fdfe871777f7b55a0293ea82a5971a9e2a80d6 /bkucommon/src/main/java/at
parent540d47d3275c6754d40632e588daecc8b29aa1a4 (diff)
downloadmocca-271a40ff1cf25c5eadf7a7f42e93fd85775a9ff7.tar.gz
mocca-271a40ff1cf25c5eadf7a7f42e93fd85775a9ff7.tar.bz2
mocca-271a40ff1cf25c5eadf7a7f42e93fd85775a9ff7.zip
Allow 8bit as content transfer encoding for multipart/formdata
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1304 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/main/java/at')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
index afefb13e..fcaa1be6 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
@@ -95,7 +95,7 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement
};
public final static Collection<String> XML_REQ_TRANSFER_ENCODING = Arrays
- .asList(new String[] { "binary" });
+ .asList(new String[] { "binary", "8bit" });
protected static String XML_MIME_TYPE = "text/xml";
protected static String BINARY_MIME_TYPE = "application/octet-stream";
@@ -396,9 +396,9 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement
if (keyVal.length == 2) {
val = keyVal[1];
val = val.trim();
- } else {
- log.error("Invalid transfer header encoding: {}.", paramString);
- throw new SLBindingException(2005);
+ } else {
+ log.error("Invalid transfer header encoding: {}.", paramString);
+ throw new SLBindingException(2005);
}
log.debug("Setting header '{}' to value '{}'.", key, val);
conn.setHTTPHeader(key, val);
@@ -699,7 +699,7 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement
FormParameter fp = formParameterMap.get(aParameterName);
if (fp != null) {
final String enc = fp.getHeaderValue("Content-Transfer-Encoding");
- if (enc == null || "binary".equals(enc)) {
+ if (enc == null || "binary".equals(enc) || "8bit".equals(enc)) {
return fp.getFormParameterValue();
} else if ("base64".equals(enc)) {
return new Base64InputStream(fp.getFormParameterValue());