Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 22C9E200C23 for ; Wed, 22 Feb 2017 18:05:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 217B5160B62; Wed, 22 Feb 2017 17:05:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6D150160B49 for ; Wed, 22 Feb 2017 18:05:09 +0100 (CET) Received: (qmail 26958 invoked by uid 500); 22 Feb 2017 17:05:08 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 26949 invoked by uid 99); 22 Feb 2017 17:05:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2017 17:05:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 89BFFDFC1C; Wed, 22 Feb 2017 17:05:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <2fe7230e22fe4dd0a746f2aee1f845fa@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Wed, 22 Feb 2017 17:05:10 -0000 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 Authored: Wed Feb 22 16:51:17 2017 +0000 Committer: Sergey Beryozkin 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 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 getBinaryContentMediaTypes() { + return binaryContentMediaTypes; + } + public void setBinaryContentMediaTypes(List binaryContentMediaTypes) { + this.binaryContentMediaTypes = binaryContentMediaTypes; + } }