Module: kamailio
Branch: 6.0
Commit: f761cad5b462820af060d6e07410f0dd84c1a52f
URL: 
https://github.com/kamailio/kamailio/commit/f761cad5b462820af060d6e07410f0dd84c1a52f

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-03-20T07:16:38+01:00

microhttpd: create response with MHD_RESPMEM_MUST_COPY flag

(cherry picked from commit 1569a7b71af26f5b3cb7cb25de7d2425c75f5587)

---

Modified: src/modules/microhttpd/microhttpd_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f761cad5b462820af060d6e07410f0dd84c1a52f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f761cad5b462820af060d6e07410f0dd84c1a52f.patch

---

diff --git a/src/modules/microhttpd/microhttpd_mod.c 
b/src/modules/microhttpd/microhttpd_mod.c
index 9a913b449bb..eaf2820ce68 100644
--- a/src/modules/microhttpd/microhttpd_mod.c
+++ b/src/modules/microhttpd/microhttpd_mod.c
@@ -360,7 +360,7 @@ static int ksr_mhttpd_send_reply(
        }
 
        response = MHD_create_response_from_buffer(
-                       sbody->len, sbody->s, MHD_RESPMEM_PERSISTENT);
+                       sbody->len, sbody->s, MHD_RESPMEM_MUST_COPY);
        if(response == NULL) {
                LM_ERR("failed to create the response\n");
                return -1;

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to