chrysn / aiocoap

The Python CoAP library
Other
262 stars 119 forks source link

No Size2 sent in block-wise responses #300

Open tautologyclub opened 1 year ago

tautologyclub commented 1 year ago

RFC 7959 states that the size2 option in a request should cause server to provide the full file size. This does not seem to happen when I try it. Not 100% positive aiocoap is to blame, but the client uses a library that supposedly works well with other coap file servers.

Is this expected?

chrysn commented 1 year ago

It does not yet (similar to how it didn't send block1 until recently).

I don't really plan to provide size2 conditional on the size2 in the request -- I consider that a slightly weird feature, and would rather send size2 unconditionally in the first block unless there are specific reasons not to do that.

chrysn commented 1 year ago

Title updated as this is not exclusive to aiocoap-fileserver (and should happen on all block-wise situations when the library knows what's going on).