[ 
https://issues.apache.org/jira/browse/CAMEL-8120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14276773#comment-14276773
 ] 

Willem Jiang commented on CAMEL-8120:
-------------------------------------

Applied the patch into camel master branch.

> ChannelHandlerFactories.newDelimiterBasedFrameDecoder always strips delimiters
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-8120
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8120
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-netty4
>    Affects Versions: 2.14.0
>            Reporter: Mark Mindenhall
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.15.0
>
>
> 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)

Reply via email to