Closed alfiedouglas-tewke closed 6 months ago
Hi @alfiedouglas-tewke, thank you for reporting this issue! I will try to look into it in the upcoming days and provide a fix as soon as possible.
Could you try out if #366 works for you as a workaround? After doing some investigation, the server side seemed to be the cause of the problem.
@alfiedouglas-tewke An chance to verify the fix from your side?
Hi @JKRhb @Apollon77, thank so much for the fix! Unfortunately it did not solve the bug for me. When looking in Wireshark, the responses contain the options, so I think this is a bug on the client side?
Hi @alfiedouglas-tewke, thank you for your feedback :) It is a bit strange, since when I did the tests using adjusted versions of the client and server examples, the server options only appeared in the first Block2 message, but not in any message that followed (and the client then only used the last message's options to compose the response that got emitted in the end).
Could you maybe try to create a minimal, self-contained example (i.e., containing both client and server code) that reproduces the bug?
Hi @JKRhb, I have recreated it in this example. When I use payload2
I loose the option Content-Format
option. I have attached the source and have used a copy of the branch https://github.com/coapjs/node-coap/tree/fix-block2-options as node-coap
in this example.
Using (small) payload1
:
Using (large) payload2
:
I am trying to add a
Content-Format
option to my COAP response, this seems to work when the data size is below1280
. But if it exceeds1280
the data is received, but removes the added option. I have checked the response in wireshark and the option is there, so it must be where the packet is reconstructed on the client.Working example with a small packet
Here I loose the
Content-Format
option on the client, see screenshot:I assume this is to do with when the client receiving a blockwise transfer?