@@ -254,14 +254,15 @@ int json_init(modsec_rec *msr, char **error_msg) {
254254 * yajl initialization
255255 *
256256 * yajl_parser_config definition:
257- * http://lloyd.github.com /yajl/yajl-1 .0.12/structyajl__parser__config .html
257+ * http://lloyd.github.io /yajl/yajl-2 .0.1/yajl__parse_8h .html#aec816c5518264d2ac41c05469a0f986c
258258 *
259259 * TODO: make UTF8 validation optional, as it depends on Content-Encoding
260260 */
261261if (msr -> txcfg -> debuglog_level >=9 ) {
262262msr_log (msr ,9 ,"yajl JSON parsing callback initialization" );
263263 }
264264msr -> json -> handle = yajl_alloc (& callbacks ,NULL ,msr );
265+ yajl_config (msr -> json -> handle ,yajl_allow_partial_values ,0 );
265266
266267return 1 ;
267268}
@@ -278,6 +279,7 @@ int json_process_chunk(modsec_rec *msr, const char *buf, unsigned int size, char
278279if (msr -> json -> status != yajl_status_ok ) {
279280/* We need to free the yajl error message later, how to do this? */
280281* error_msg = yajl_get_error (msr -> json -> handle ,0 ,buf ,size );
282+ return -1 ;
281283 }
282284
283285return 1 ;
@@ -297,6 +299,7 @@ int json_complete(modsec_rec *msr, char **error_msg) {
297299if (msr -> json -> status != yajl_status_ok ) {
298300/* We need to free the yajl error message later, how to do this? */
299301* error_msg = yajl_get_error (msr -> json -> handle ,0 ,NULL ,0 );
302+ return -1 ;
300303 }
301304
302305return 1 ;