go-coap
go-coap copied to clipboard
not get block2 option in server
When I send a Get Message with block2 option,but in server side Options.HasOption(message.Block2) return false。Is there anything that needs special attention?
@jkralik I think this is the relevant code:
https://github.com/plgd-dev/go-coap/blob/49cae1ca2883b97159e646b1d05635ceb1f21bd6/net/blockwise/blockwise.go#L534-L540
Do you recall why the Block2 option is removed from the message before its passed to the next handler function? Maybe the error check is inverted?
@lx121451 Pls, why do you need block2? Thx
Do you recall why the
Block2option is removed from the message before its passed to thenexthandler function? Maybe the error check is inverted?
No, it's correct.
@lx121451 Pls, why do you need
block2? Thx
Just for test,I'm simulating a file transfer server with separate response!
For test you can use https://github.com/plgd-dev/go-coap/blob/master/options/commonOptions.go#L278 to watch all messages that comes to server in v3.
I will close the issue, feel free to reopen it.