[ https://issues.apache.org/jira/browse/CAMEL-21799 ]


    Vishesh deleted comment on CAMEL-21799:
    ---------------------------------

was (Author: JIRAUSER308816):
Please change current code 

*byte[] bytes = exchange.getCurrentRequest().getPayload();*

to ** **

{*}byte[] bytes = exchange.getRequest().getPayload();{*}{*}{*}

 

*Please refer attachment to see the change in class CamelCoapResource.java*

*[^CamelCoapResource.java]*
 

> camel-coap - Exchange retrieve only the last block of Blockwise  
> -----------------------------------------------------------------
>
>                 Key: CAMEL-21799
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21799
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-coap
>    Affects Versions: 4.8.0, 4.10.0
>            Reporter: Vishesh
>            Assignee: Claus Ibsen
>            Priority: Minor
>              Labels: camel-coap, coap
>             Fix For: 4.8.4, 4.10.1, 4.11.0
>
>         Attachments: CamelCoapResource.java
>
>
> We've observed a bug in camel-coap library latest version. As per observation 
> solution received all the packet blockwise since the payload exceed the 
> limit. At californium library level we can clearly see that all packages 
> received successfully. However when it delegate the response to camel we just 
> receive the last packet instead of full payload. 
> The root cause of the problem in the camel-coap library is located in the 
> class org.apache.camel.coap.CamelCoapResource where, at line 137, the method 
> getCurrentRequest is called instead of getRequest, causing only the last 
> packet of a blockwise transfer to be received instead of the full payload.
>             *byte[] bytes = exchange.getCurrentRequest().getPayload();*
>             camelExchange.getIn().setBody(bytes);



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to