gcoap_fileserver: can't deal with 16 byte block size #20686
Closed
Description
Description
When requesting 16 byte block size, the server will respond with an invalid packet.
Steps to reproduce the issue
-
run
examples/gcoap_fileserver
:make -C examples/gcoap_fileserver PORT=tap1 all term
-
create a dummy file
echo "Hello World!" > examples/gcoap_fileserver/native/me
-
Try to access the file via e.g.
ncget
with a 16 byte block sizeCFLAGS=-DCONFIG_NANOCOAP_BLOCKSIZE_DEFAULT=COAP_BLOCKSIZE_16 make -C tests/net/nanocoap_cli all term > ncget coap://[fe80::d07c:7cff:fe6d:9441]/vfs/me -
Expected results
We get the response in a single block
Actual results
We get the response in a single block, but there is some garbage after the block2 option:
Versions
RIOT master