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 100292009E8 for ; Mon, 30 May 2016 10:46:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0ECDA160A16; Mon, 30 May 2016 08:46:15 +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 4D53B160A3C for ; Mon, 30 May 2016 10:46:14 +0200 (CEST) Received: (qmail 13179 invoked by uid 500); 30 May 2016 08:46:13 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 13122 invoked by uid 99); 30 May 2016 08:46:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2016 08:46:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DC4C72C1F64 for ; Mon, 30 May 2016 08:46:12 +0000 (UTC) Date: Mon, 30 May 2016 08:46:12 +0000 (UTC) From: "Hiranya Jayathilaka (JIRA)" To: dev@synapse.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (SYNAPSE-1028) Possible Bugs in Code for Handling Content Length Encoding MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 30 May 2016 08:46:15 -0000 Hiranya Jayathilaka created SYNAPSE-1028: -------------------------------------------- Summary: Possible Bugs in Code for Handling Content Length Encoding Key: SYNAPSE-1028 URL: https://issues.apache.org/jira/browse/SYNAPSE-1028 Project: Synapse Issue Type: Bug Components: Transports Affects Versions: NIGHTLY Reporter: Hiranya Jayathilaka Assignee: Hiranya Jayathilaka Priority: Blocker Fix For: 3.0 If I'm not mistaken, the following bit of code in PassThroughHttpSender serializes the same message at least 3 times: {code} if("true".equals(disableChunking) || "true".equals(forceHttp10) ){ ByteArrayOutputStream _out = new ByteArrayOutputStream(); MessageFormatter formatter = MessageProcessorSelector.getMessageFormatter(msgContext); OMOutputFormat format = PassThroughTransportUtils.getOMOutputFormat(msgContext); formatter.writeTo(msgContext, format, _out, false); try { long messageSize = setStreamAsTempData(formatter, msgContext, format); msgContext.setProperty( PassThroughConstants.PASS_THROUGH_MESSAGE_LENGTH, messageSize); formatter.writeTo(msgContext, format, out, false); } catch (IOException e) { handleException("I/O error while serializing message", e); } {code} Also the setStreamAsTempData method uses a deprecated Axiom API. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org For additional commands, e-mail: dev-help@synapse.apache.org