aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-coap.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-coap.c')
-rw-r--r--epan/dissectors/packet-coap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c
index ae08aba66c..2a5dac9dc8 100644
--- a/epan/dissectors/packet-coap.c
+++ b/epan/dissectors/packet-coap.c
@@ -27,6 +27,7 @@
#include <epan/to_str.h>
#include "packet-dtls.h"
#include "packet-coap.h"
+#include "packet-http.h"
void proto_register_coap(void);
@@ -920,6 +921,7 @@ dissect_coap_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *coap_tree, p
tvbuff_t *payload_tvb;
guint payload_length = offset_end - offset;
const char *coap_ctype_str_dis;
+ http_message_info_t message_info;
char str_payload[80];
/* coinfo->ctype_value == DEFAULT_COAP_CTYPE_VALUE: No Content-Format option present */
@@ -965,8 +967,10 @@ dissect_coap_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *coap_tree, p
PROTO_ITEM_SET_GENERATED(length_item);
payload_tvb = tvb_new_subset_length(tvb, offset, payload_length);
+ message_info.type = HTTP_OTHERS;
+ message_info.media_str = wmem_strbuf_get_str(coinfo->uri_str_strbuf);
dissector_try_string(media_type_dissector_table, coap_ctype_str_dis,
- payload_tvb, pinfo, parent_tree, NULL);
+ payload_tvb, pinfo, parent_tree, &message_info);
if (coinfo->object_security && !oscore) {
proto_item_set_text(payload_item, "Encrypted OSCORE Data");