Vishesh created CAMEL-21799:
-------------------------------

             Summary: 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.10.0, 4.8.0
            Reporter: Vishesh


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