Return-Path: Delivered-To: apmail-ws-kandula-dev-archive@www.apache.org Received: (qmail 84008 invoked from network); 28 Sep 2010 10:22:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 10:22:59 -0000 Received: (qmail 3079 invoked by uid 500); 28 Sep 2010 10:22:58 -0000 Delivered-To: apmail-ws-kandula-dev-archive@ws.apache.org Received: (qmail 2684 invoked by uid 500); 28 Sep 2010 10:22:56 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 2675 invoked by uid 99); 28 Sep 2010 10:22:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 10:22:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 10:22:54 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8SAMXV0023541 for ; Tue, 28 Sep 2010 10:22:34 GMT Message-ID: <30492908.440401285669353922.JavaMail.jira@thor> Date: Tue, 28 Sep 2010 06:22:33 -0400 (EDT) From: "Andreas Veithen (JIRA)" To: java-dev@axis.apache.org Subject: [jira] Assigned: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings In-Reply-To: <20408559.74641274047902157.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Veithen reassigned AXIS2-4716: -------------------------------------- Assignee: Andreas Veithen > Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings > ------------------------------------------------------------------------------------------------------------------------------- > > Key: AXIS2-4716 > URL: https://issues.apache.org/jira/browse/AXIS2-4716 > Project: Axis2 > Issue Type: Bug > Components: transports > Affects Versions: nightly > Reporter: Dave Bryant > Assignee: Andreas Veithen > > There is a threading issue in the CommonsHTTPTransportSender.writeMessageWithCommons() method where it determines what HTTP version to use when sending the message and whether the chunked transfer encoding should be used. The 'chunked' and 'httpVersion' member variables are set when this transport sender is constructed, but are then overridden as every message is sent if that message defines a property explicitly enabling the chunked encoding, or setting the HTTP version. However, as multiple threads may be active in this code simultaneously, it is very possible that the wrong combination of parameters will be used for a particular message. In addition, as soon as one message sets these values explicitly, the default values are changed for all subsequent messages. > In the current trunk (r919960) from line 392: > {code} > if (messageContext.getProperty(HTTPConstants.CHUNKED) != null) { > chunked = JavaUtils.isTrueExplicitly(messageContext > .getProperty(HTTPConstants.CHUNKED)); > } > if (messageContext.getProperty(HTTPConstants.HTTP_PROTOCOL_VERSION) != null) { > httpVersion = (String) messageContext > .getProperty(HTTPConstants.HTTP_PROTOCOL_VERSION); > } > // Following order needed to be preserved because, > // HTTP/1.0 does not support chunk encoding > sender.setChunked(chunked); > sender.setHttpVersion(httpVersion); > sender.setFormat(format); > {code} > This should be changed to use local variables for the http version and chunked encoding value, and retrieve this either from the message property or from the member variables if the message property is not set. The member variables for these settings should be regarded as immutable after init() has been called. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org