mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-28 01:27:09 +03:00
Duplicate MIDs: If repeat MID request, send back previous response
Clean up duplicate MID handling, and just send back last response if MID matches. Removed COAP_BLOCK_CACHE_RESPONSE as no longer required for duplicate MID handling, and so no need to send an Empty ACK response for a subsequent Separate response as a referenced copy of the last PDU respponse is now kept for a session. Note that if a request is sent by a proxy to an upstream server, this always converts the upstream server's response into a Separate response back to the client as the upstream server may take time to respond, do any error recovery etc.
This commit is contained in:
1 parent
72978e9fc6
commit
94bacc8939
13 files changed
+34
-139
No files matched your search
@@ -1870,7 +1870,7 @@ usage(const char *program, const char *version) {
|
||||
"\t \t\ta response is received\n"
|
||||
"\t-L value\tSum of one or more COAP_BLOCK_* flag valuess for block\n"
|
||||
"\t \t\thandling methods. Default is 1 (COAP_BLOCK_USE_LIBCOAP)\n"
|
||||
"\t \t\t(Sum of one or more of 1,2,4 64, 128, 256 and 512)\n"
|
||||
"\t \t\t(Sum of one or more of 1,2,4 64, 128 and 512)\n"
|
||||
"\t-N \t\tMake \"observe\" responses NON-confirmable. Even if set\n"
|
||||
"\t \t\tevery fifth response will still be sent as a confirmable\n"
|
||||
"\t \t\tresponse (RFC 7641 requirement)\n"
|
||||
|
||||
@@ -155,7 +155,7 @@ LWIP_MALLOC_MEMPOOL_START
|
||||
LWIP_MALLOC_MEMPOOL(MEMP_NUM_COAPSTRING, 64)
|
||||
LWIP_MALLOC_MEMPOOL(4, 256)
|
||||
LWIP_MALLOC_MEMPOOL(2, 512)
|
||||
LWIP_MALLOC_MEMPOOL(2, 1512)
|
||||
LWIP_MALLOC_MEMPOOL(4, 1512)
|
||||
LWIP_MALLOC_MEMPOOL_END
|
||||
LWIP_MEMPOOL(COAP_STRING, 1, 1, "COAP_STRING")
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ if [ "$SUPPRESS" = no ] ; then
|
||||
fi
|
||||
echo -n "Test 11 - "
|
||||
timeout 10 $CLIENT -w -v8 -E $INDIR/interop/a_client.conf,/tmp/client_a -m delete coap://$TARGET_IP:$S_PORT_B/oscore/test > /tmp/client_out 2>&1
|
||||
passfail 1 "^v:1 t:CON c:2.02 i:"
|
||||
passfail 1 "^v:1 t:ACK c:2.02 i:"
|
||||
|
||||
# Test 12
|
||||
if [ "$SUPPRESS" = no ] ; then
|
||||
|
||||
Reference in new issue
Block a user