synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiranya Jayathilaka (JIRA)" <>
Subject [jira] [Created] (SYNAPSE-1028) Possible Bugs in Code for Handling Content Length Encoding
Date Mon, 30 May 2016 08:46:12 GMT
Hiranya Jayathilaka created SYNAPSE-1028:

             Summary: Possible Bugs in Code for Handling Content Length Encoding
                 Key: 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:

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);
         PassThroughConstants.PASS_THROUGH_MESSAGE_LENGTH, messageSize);
    formatter.writeTo(msgContext, format, out, false);
  } catch (IOException e) {
    handleException("I/O error while serializing message", e);

Also the setStreamAsTempData method uses a deprecated Axiom API.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message