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 0AF9D200CB3 for ; Mon, 26 Jun 2017 16:32:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 09B98160BD9; Mon, 26 Jun 2017 14:32:05 +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 59DE3160BF8 for ; Mon, 26 Jun 2017 16:32:04 +0200 (CEST) Received: (qmail 7920 invoked by uid 500); 26 Jun 2017 14:32:03 -0000 Mailing-List: contact issues-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 issues@cxf.apache.org Received: (qmail 7787 invoked by uid 99); 26 Jun 2017 14:32:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2017 14:32:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 010D91AFC3F for ; Mon, 26 Jun 2017 14:32:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4KbHg_PVFDjp for ; Mon, 26 Jun 2017 14:32:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9CFB85FB71 for ; Mon, 26 Jun 2017 14:32:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CBCF4E099E for ; Mon, 26 Jun 2017 14:32:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2AEE4240D4 for ; Mon, 26 Jun 2017 14:32:00 +0000 (UTC) Date: Mon, 26 Jun 2017 14:32:00 +0000 (UTC) From: "Alex Korobko (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CXF-7430) The logInputStream method of the LoggingInInterceptor fails if input stream size bigger than limit and PrettyPrint option is true. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 26 Jun 2017 14:32:05 -0000 Alex Korobko created CXF-7430: --------------------------------- Summary: The logInputStream method of the LoggingInInterceptor fails if input stream size bigger than limit and PrettyPrint option is true. Key: CXF-7430 URL: https://issues.apache.org/jira/browse/CXF-7430 Project: CXF Issue Type: Bug Affects Versions: 3.1.11, 3.0.13, 3.1.10, 3.0.12, 3.1.9, 3.0.11, 3.1.8, 3.1.7, 3.0.10 Reporter: Alex Korobko The logInputStream method of the LoggingInInterceptor class fails when the input stream size is bigger than the limit variable value. The problem is: # In the logInputStream method of the LoggingInInterceptor class if the input stream is bigger than limit (the default value of the limit variable defined in the AbstractLoggingInterceptor as 48 * 1024) the input stream is truncated to the length of the limit value; #The logInputStream method of the LoggingInInterceptor class uses the writePayload method of the AbstractLoggingInterceptor to log the payload of the response; #As the PrettyPrint option is true, the writePayload method attempts to use the PrettyPrintXMLWriter class to log already truncated XML data and throws exception. It seems like the issue could be resolved if the LoggingInInterceptor class resets the PrettyPrint option to false every time if the input stream was truncated. I faced this issue in my project that uses older version of the library, but as I can see in sources of the current version of the library, the problem should persist in the latest stable version as well. -- This message was sent by Atlassian JIRA (v6.4.14#64029)