From 271a40ff1cf25c5eadf7a7f42e93fd85775a9ff7 Mon Sep 17 00:00:00 2001 From: tkellner Date: Mon, 10 Mar 2014 15:22:56 +0000 Subject: 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 --- .../java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bkucommon/src/main/java/at') 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 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()); -- cgit v1.2.3