You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by am...@apache.org on 2018/01/18 21:06:09 UTC
[cxf] 01/02: Allow users to override default max header size for
attachments
This is an automated email from the ASF dual-hosted git repository.
amccright pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit a433f09f6a2e051bceca5a902edc1c7439385a55
Author: Andy McCright <j....@gmail.com>
AuthorDate: Thu Jan 18 14:30:36 2018 -0600
Allow users to override default max header size for attachments
---
.../main/java/org/apache/cxf/attachment/AttachmentDeserializer.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java b/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java
index 56dbb13..d9a8a9a 100644
--- a/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java
+++ b/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java
@@ -34,9 +34,11 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.activation.DataSource;
+import javax.mail.MessagingException;
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.common.util.SystemPropertyAction;
import org.apache.cxf.helpers.HttpHeaderHelper;
import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.io.CachedOutputStream;
@@ -56,7 +58,8 @@ public class AttachmentDeserializer {
* The maximum MIME Header Length. The default is 300.
*/
public static final String ATTACHMENT_MAX_HEADER_SIZE = "attachment-max-header-size";
- public static final int DEFAULT_MAX_HEADER_SIZE = 300;
+ public static final int DEFAULT_MAX_HEADER_SIZE =
+ SystemPropertyAction.getInteger("org.apache.cxf.attachment-max-header-size", 300);
public static final int THRESHOLD = 1024 * 100; //100K (byte unit)
--
To stop receiving notification emails like this one, please contact
"commits@cxf.apache.org" <co...@cxf.apache.org>.