You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/10/25 04:10:00 UTC

[jira] [Work logged] (CAMEL-14098) netty throws exception if post does not have an empty body

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

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

                Author: ASF GitHub Bot
            Created on: 25/Oct/19 04:09
            Start Date: 25/Oct/19 04:09
    Worklog Time Spent: 10m 
      Work Description: zhfeng commented on pull request #3280: CAMEL-14098 - Camel-netty-http: Update to fix the issue when populate…
URL: https://github.com/apache/camel/pull/3280
 
 
   … the http request headers
   https://issues.apache.org/jira/browse/CAMEL-14098
 
----------------------------------------------------------------
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:
users@infra.apache.org


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

            Worklog Id:     (was: 333870)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>    Affects Versions: 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
>
>         Attachments: UiaMain.java, UiaRouteConfig.java, pom.xml
>
>          Time Spent: 10m
>  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)