You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/02/22 16:51:42 UTC

cxf git commit: [CXF-7259] Allowing to customize the binary media types to be filtered out

Repository: cxf
Updated Branches:
  refs/heads/master 1552f8811 -> 437c7daa3


[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/437c7daa
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/437c7daa
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/437c7daa

Branch: refs/heads/master
Commit: 437c7daa3345c8482deab4a4da9b164e68fd417a
Parents: 1552f88
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Wed Feb 22 16:51:17 2017 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Wed Feb 22 16:51:17 2017 +0000

----------------------------------------------------------------------
 .../apache/cxf/interceptor/AbstractLoggingInterceptor.java  | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/437c7daa/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 a120247..14838e3 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
@@ -73,6 +73,7 @@ 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,11 @@ 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;
+    }
 
 }