Module: kamailio Branch: master Commit: 2b331d95ae62eb0000a289e1bdb668ee7bc572cb URL: https://github.com/kamailio/kamailio/commit/2b331d95ae62eb0000a289e1bdb668ee...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2025-04-18T10:21:00+02:00
microhttpd: warning on failing to add content-type
---
Modified: src/modules/microhttpd/microhttpd_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/2b331d95ae62eb0000a289e1bdb668ee... Patch: https://github.com/kamailio/kamailio/commit/2b331d95ae62eb0000a289e1bdb668ee...
---
diff --git a/src/modules/microhttpd/microhttpd_mod.c b/src/modules/microhttpd/microhttpd_mod.c index 7bd8d304644..ff486ac7dd6 100644 --- a/src/modules/microhttpd/microhttpd_mod.c +++ b/src/modules/microhttpd/microhttpd_mod.c @@ -373,7 +373,10 @@ static int ksr_mhttpd_send_reply( return -1; } if(sctype->len > 0) { - MHD_add_response_header(response, "Content-Type", sctype->s); + if(MHD_add_response_header(response, "Content-Type", sctype->s) + == MHD_NO) { + LM_WARN("failed to add Content-Type header\n"); + } } ret = MHD_queue_response( _ksr_mhttpd_ctx.connection, (unsigned int)rcode, response);