This is an automated email from the ASF dual-hosted git repository.

amccright pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new ea0f95b  Allow users to override default max header size for 
attachments
ea0f95b is described below

commit ea0f95b9ada30f62ee9d23e7f8aaf6d71339c2de
Author: Andy McCright <[email protected]>
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 9fb1975..ebfff7d 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
['"[email protected]" <[email protected]>'].

Reply via email to