coap_block.c: Fix returning 2.03 for ETag match

Tag server returned data with a digest computed ETag option value so
requests with an ETag option can return 2.03 if there is a match.

The size of bytes hash that is computed for the ETag can be overwritten by
localy defining COAP_ETAG_MAX_BYTES to be a value between 1 and 8 bytes
inclusive.  It is set to 4 by default.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2024-12-02 10:15:51 +00:00
1 parent 3457c2e2fd
commit 5f4c2ab96b
4 files changed
+126 -53

No files matched your search

-1
View File
@@ -163,7 +163,6 @@ struct coap_context_t {
uint32_t csm_timeout_ms; /**< Timeout for waiting for a CSM from
the remote side. */
uint32_t csm_max_message_size; /**< Value for CSM Max-Message-Size */
uint64_t etag; /**< Next ETag to use */
#if COAP_SERVER_SUPPORT
coap_cache_entry_t *cache; /**< CoAP cache-entry cache */