cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7259] Allowing to customize the binary media types to be filtered out
Date Wed, 22 Feb 2017 17:05:08 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes a48c2f07f -> 9bb9d311b


[CXF-7259] Allowing to customize the binary media types to be filtered out


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9bb9d311
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9bb9d311
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9bb9d311

Branch: refs/heads/3.1.x-fixes
Commit: 9bb9d311bb205294ddecbe13324bc031b39b0774
Parents: a48c2f0
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Feb 22 16:51:17 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Feb 22 17:04:39 2017 +0000

----------------------------------------------------------------------
 .../cxf/interceptor/AbstractLoggingInterceptor.java     | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9bb9d311/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
b/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
index 889f4f6..cb19a8b 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
@@ -73,7 +73,8 @@ public abstract class AbstractLoggingInterceptor extends AbstractPhaseIntercepto
     protected boolean prettyLogging;
     private boolean showBinaryContent;
     private boolean showMultipartContent = true;
-    
+    private List<String> binaryContentMediaTypes = BINARY_CONTENT_MEDIA_TYPES;
+
     public AbstractLoggingInterceptor(String phase) {
         super(phase);
     }
@@ -280,7 +281,7 @@ public abstract class AbstractLoggingInterceptor extends AbstractPhaseIntercepto
         return showBinaryContent;
     }
     protected boolean isBinaryContent(String contentType) {
-        return contentType != null && BINARY_CONTENT_MEDIA_TYPES.contains(contentType);
+        return contentType != null && binaryContentMediaTypes.contains(contentType);
     }
     public boolean isShowMultipartContent() {
         return showMultipartContent;
@@ -291,5 +292,10 @@ public abstract class AbstractLoggingInterceptor extends AbstractPhaseIntercepto
     protected boolean isMultipartContent(String contentType) {
         return contentType != null && contentType.startsWith(MULTIPART_CONTENT_MEDIA_TYPE);
     }
-    
+    public List<String> getBinaryContentMediaTypes() {
+        return binaryContentMediaTypes;
+    }
+    public void setBinaryContentMediaTypes(List<String> binaryContentMediaTypes) {
+        this.binaryContentMediaTypes = binaryContentMediaTypes;
+    }
 }


Mime
View raw message