Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.24.2, 3.0.0.RC2
-
None
-
Java 1.8 running on a Mac
-
Unknown
Description
I have a very simple route:
class UiaRouteConfig extends RouteBuilder { @Override public void configure() { from("netty-http:http://0.0.0.0:8080/authorization") .to("mock:foo"); } }
If I send a post with no data like this, it works as expected:
curl -v -X POST http://localhost:8080/authorization
However, if I send even one byte of data like this
curl -v -X POST http://localhost:8080/authorization -d x
netty throws this exception:
13:10:14.370 [Camel (camel-1) thread #5 - NettyEventExecutorGroup] DEBUG o.a.c.c.netty.http.NettyHttpConsumer - Closing channel as an exception was thrown from Netty13:10:14.370 [Camel (camel-1) thread #5 - NettyEventExecutorGroup] DEBUG o.a.c.c.netty.http.NettyHttpConsumer - Closing channel as an exception was thrown from Nettyio.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1 at io.netty.util.internal.ReferenceCountUpdater.toLiveRealRefCnt(ReferenceCountUpdater.java:74) at io.netty.util.internal.ReferenceCountUpdater.release(ReferenceCountUpdater.java:138) at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:100) at io.netty.handler.codec.http.HttpObjectAggregator$AggregatedFullHttpMessage.release(HttpObjectAggregator.java:379) at io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:88) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:112) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:56) at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:365) at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66) at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.base/java.lang.Thread.run(Thread.java:834)
If it helps, I have uploaded the two classes in this example, along with a maven pom file to build an executable .jar.