Mark Mindenhall created CAMEL-8120: -------------------------------------- Summary: ChannelHandlerFactories.newDelimiterBasedFrameDecoder always strips delimiters Key: CAMEL-8120 URL: https://issues.apache.org/jira/browse/CAMEL-8120 Project: Camel Issue Type: Bug Components: camel-netty4 Affects Versions: 2.14.0 Reporter: Mark Mindenhall
The constructor of _{{io.netty.handler.codec.DelimiterBasedFrameDecoder}}_ includes a boolean _{{stripDelimiter}}_ parameter, which is always set to true by the _{{ChannelHandlerFactories.newDelimiterBasedFrameDecoder}}_ method (both directly and within _{{org.apache.camel.component.netty4.codec.DatagramPacketDelimiterDecoder}}_, which delegates to _{{DelimiterBasedFrameDecoder}}_) This parameter needs to be set to false when the end-of-frame delimiter is part of the message (e.g., the closing tag of an XML document), and therefore must not be discarded. Suggested fix: - Add a new constructor to _{{DatagramPacketDelimiterDecoder}}_ that includes the parameter, which is then passed through to the delegate _{{DelimiterBasedFrameDecoder}}_ - Add a new method signature for _{{ChannelHandlerFactories.newDelimiterBasedFrameDecoder}}_ that includes the parameter - refactor existing _{{newDelimiterBasedFrameDecoder}}_ method to delegate to the new method -- This message was sent by Atlassian JIRA (v6.3.4#6332)