Module: kamailio
Branch: 5.8
Commit: 1d3eed5c186d2b4584459fb5d3fcdd8458a01186
URL: 
https://github.com/kamailio/kamailio/commit/1d3eed5c186d2b4584459fb5d3fcdd8458a01186

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

microhttpd: create response with MHD_RESPMEM_MUST_COPY flag

(cherry picked from commit 1569a7b71af26f5b3cb7cb25de7d2425c75f5587)
(cherry picked from commit f761cad5b462820af060d6e07410f0dd84c1a52f)

---

Modified: src/modules/microhttpd/microhttpd_mod.c

---

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

---

diff --git a/src/modules/microhttpd/microhttpd_mod.c 
b/src/modules/microhttpd/microhttpd_mod.c
index dbfaec01786..1bf684d01a7 100644
--- a/src/modules/microhttpd/microhttpd_mod.c
+++ b/src/modules/microhttpd/microhttpd_mod.c
@@ -359,7 +359,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