[sr-dev] git:5.5:cf6c70f0: xhttp: warning log if tcp_accept_no_cl is not set

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 24 18:35:39 CEST 2021


Module: kamailio
Branch: 5.5
Commit: cf6c70f00fda196ac9eba4a2ccd24b382d41b240
URL: https://github.com/kamailio/kamailio/commit/cf6c70f00fda196ac9eba4a2ccd24b382d41b240

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-24T18:34:10+02:00

xhttp: warning log if tcp_accept_no_cl is not set

(cherry picked from commit b8fbf5e8c199b8277053f9c15231695a16058d6e)

---

Modified: src/modules/xhttp/xhttp_mod.c

---

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

---

diff --git a/src/modules/xhttp/xhttp_mod.c b/src/modules/xhttp/xhttp_mod.c
index f62c880a9a..1aec2763d9 100644
--- a/src/modules/xhttp/xhttp_mod.c
+++ b/src/modules/xhttp/xhttp_mod.c
@@ -41,6 +41,7 @@
 #include "../../core/sip_msg_clone.h"
 #include "../../core/mod_fix.h"
 #include "../../core/pvar.h"
+#include "../../core/tcp_options.h"
 #include "../../core/kemi.h"
 
 #include "api.h"
@@ -142,6 +143,11 @@ static int mod_init(void)
 		xhttp_route_no = route_no;
 	}
 
+	if(cfg_get(tcp, tcp_cfg, accept_no_cl)==0) {
+		LM_WARN("tcp_accept_no_cl not set - usually required"
+				" to handle HTTP requests with no Content-Lenght\n");
+	}
+
 	/* bind the SL API */
 	if(sl_load_api(&slb) != 0) {
 		LM_ERR("cannot bind to SL API\n");




More information about the sr-dev mailing list