You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kandula-dev@ws.apache.org by "Dave Bryant (JIRA)" <ji...@apache.org> on 2010/05/17 00:11:42 UTC

[jira] Created: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

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


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


[jira] Resolved: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4716.
------------------------------------

    Fix Version/s: 1.6
       Resolution: Fixed

Fixed by r1002140 on the trunk, i.e. for 1.6. Please let me know if you also want this fix be applied to the 1.5 branch, i.e. for 1.5.3.

> 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: 1.5.2
>            Reporter: Dave Bryant
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>
> 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


[jira] Assigned: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ 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


[jira] Assigned: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ 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


[jira] Updated: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4716:
-----------------------------------

    Affects Version/s: 1.5.2
                           (was: nightly)

> 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: 1.5.2
>            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


[jira] Updated: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4716:
-----------------------------------

    Affects Version/s: 1.5.2
                           (was: nightly)

> 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: 1.5.2
>            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


[jira] Updated: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4716:
-----------------------------------

    Affects Version/s: 1.5.2
                           (was: nightly)

> 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: 1.5.2
>            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


[jira] Resolved: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4716.
------------------------------------

    Fix Version/s: 1.6
       Resolution: Fixed

Fixed by r1002140 on the trunk, i.e. for 1.6. Please let me know if you also want this fix be applied to the 1.5 branch, i.e. for 1.5.3.

> 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: 1.5.2
>            Reporter: Dave Bryant
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>
> 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


[jira] Assigned: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ 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


[jira] Resolved: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4716.
------------------------------------

    Fix Version/s: 1.6
       Resolution: Fixed

Fixed by r1002140 on the trunk, i.e. for 1.6. Please let me know if you also want this fix be applied to the 1.5 branch, i.e. for 1.5.3.

> 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: 1.5.2
>            Reporter: Dave Bryant
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>
> 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


[jira] Assigned: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ 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


[jira] Assigned: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ 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


[jira] Updated: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4716:
-----------------------------------

    Affects Version/s: 1.5.2
                           (was: nightly)

> 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: 1.5.2
>            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


[jira] Resolved: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4716.
------------------------------------

    Fix Version/s: 1.6
       Resolution: Fixed

Fixed by r1002140 on the trunk, i.e. for 1.6. Please let me know if you also want this fix be applied to the 1.5 branch, i.e. for 1.5.3.

> 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: 1.5.2
>            Reporter: Dave Bryant
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>
> 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


[jira] Resolved: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4716.
------------------------------------

    Fix Version/s: 1.6
       Resolution: Fixed

Fixed by r1002140 on the trunk, i.e. for 1.6. Please let me know if you also want this fix be applied to the 1.5 branch, i.e. for 1.5.3.

> 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: 1.5.2
>            Reporter: Dave Bryant
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>
> 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


[jira] Updated: (AXIS2-4716) Threading issue in CommonsHTTPTransportSender when different messages use different HTTP versions or transfer encoding settings

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4716:
-----------------------------------

    Affects Version/s: 1.5.2
                           (was: nightly)

> 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: 1.5.2
>            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