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 1D333200C23 for ; Wed, 22 Feb 2017 17:51:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1BCDE160B62; Wed, 22 Feb 2017 16:51:44 +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 63762160B49 for ; Wed, 22 Feb 2017 17:51:43 +0100 (CET) Received: (qmail 72334 invoked by uid 500); 22 Feb 2017 16:51:42 -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 72325 invoked by uid 99); 22 Feb 2017 16:51:42 -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 16:51:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 62CA1DFF0F; Wed, 22 Feb 2017 16:51:42 +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: <82b72901e80243779cfa0b3e912579cc@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 16:51:42 +0000 (UTC) archived-at: Wed, 22 Feb 2017 16:51:44 -0000 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 Authored: Wed Feb 22 16:51:17 2017 +0000 Committer: Sergey Beryozkin 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 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 getBinaryContentMediaTypes() { + return binaryContentMediaTypes; + } + public void setBinaryContentMediaTypes(List binaryContentMediaTypes) { + this.binaryContentMediaTypes = binaryContentMediaTypes; + } }