[ 
https://issues.apache.org/jira/browse/CAMEL-14098?focusedWorklogId=334787&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-334787
 ]

ASF GitHub Bot logged work on CAMEL-14098:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Oct/19 07:06
            Start Date: 28/Oct/19 07:06
    Worklog Time Spent: 10m 
      Work Description: zhfeng commented on pull request #3286: CAMEL-14098 
Camel-netty-http: update the test to check the channel is…
URL: https://github.com/apache/camel/pull/3286
 
 
   … active
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 334787)
    Time Spent: 0.5h  (was: 20m)

> netty throws exception if post does not have an empty body
> ----------------------------------------------------------
>
>                 Key: CAMEL-14098
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14098
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty-http, camel-netty4-http
>    Affects Versions: 2.24.2, 3.0.0.RC2
>         Environment: Java 1.8 running on a Mac
>            Reporter: Mark Grand
>            Assignee: Zheng Feng
>            Priority: Major
>             Fix For: 3.0.0, 2.25.0
>
>         Attachments: UiaMain.java, UiaRouteConfig.java, pom.xml
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> I have a very simple route:
> {code:java}
> class UiaRouteConfig extends RouteBuilder {
>     @Override
>     public void configure() {
>         from("netty-http:http://0.0.0.0:8080/authorization";)
>                 .to("mock:foo");
>     }
> }
> {code}
> If I send a post with no data like this, it works as expected:
> {code:java}
> curl -v -X POST http://localhost:8080/authorization
> {code}
> However, if I send even one byte of data like this
> {code:java}
> curl -v -X POST http://localhost:8080/authorization -d x
> {code}
> netty throws this exception:
> {code}
> 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){code}
> If it helps, I have uploaded the two classes in this example, along with a 
> maven pom file to build an executable .jar.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to