Browse code

xhttp: warning log if tcp_accept_no_cl is not set

Daniel-Constantin Mierla authored on 23/06/2021 06:48:10
Showing 1 changed files
... ...
@@ -41,6 +41,7 @@
41 41
 #include "../../core/sip_msg_clone.h"
42 42
 #include "../../core/mod_fix.h"
43 43
 #include "../../core/pvar.h"
44
+#include "../../core/tcp_options.h"
44 45
 #include "../../core/kemi.h"
45 46
 
46 47
 #include "api.h"
... ...
@@ -142,6 +143,11 @@ static int mod_init(void)
142 143
 		xhttp_route_no = route_no;
143 144
 	}
144 145
 
146
+	if(cfg_get(tcp, tcp_cfg, accept_no_cl)==0) {
147
+		LM_WARN("tcp_accept_no_cl not set - usually required"
148
+				" to handle HTTP requests with no Content-Lenght\n");
149
+	}
150
+
145 151
 	/* bind the SL API */
146 152
 	if(sl_load_api(&slb) != 0) {
147 153
 		LM_ERR("cannot bind to SL API\n");