Closed JulienPnt closed 3 months ago
By writing the issue, I realized it was a false alarm. The server in my proxy is working as expected. The error occurs because it does not have the requested block from my client at the moment the client asks for it.
Sorry, yet could you advise me some tools to better test the reliability of CoAP client please. Because aicoap handles in background to much actions while I'm trying to create awkward situation.
Hi,
I designed a CoAP to CoAP proxy using aiocoap. The proxy's purpose was to test the reliability of my CoAP client and server during blockwise transfers. To create the specific awkward cases I needed, I had to remove the automatic blockwise handle from aicoap.
I set the
blockwise_handle
parameter toFalse
in the request function and I received a 408 error. To bypass this issue, I had to comment some lines into the Block2Cache class.Observed Behavior
When sending GET Block#1, the proxy returns the error 4.08 which stands for Request Entity Incomplete.
See WireShark capture below:
RequestEntityIncomplete.csv
Steps to Reproduce
False
GET #Block1
Expected Behavior
The proxy should properly handle the blockwise transfer request and return the appropriate block of data without errors.
According to RFC 7959 about the BlockWiseTransfer chapter 2.9.2, the 408 error is raised to indicate:
Upon checking the Wireshark capture, it was observed that my client never sent the GET Block#0 request before requesting Block#1. This occurs because my client cannot know beforehand that the response will require handling a blockwise transfer.
As it is shown on the figure 2 from the chapter 3.2 in the RFC 7959.
Conclusion
To bypass this issue, I had to comment the line from 120 to 128 in blockwise.py. The issue seems to be related to the cache management.
Environment