@@ -1072,7 +1072,8 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
10721072 }
10731073
10741074htmlDocContentDumpFormatOutput (output_buf ,msr -> crypto_html_tree ,NULL ,0 );
1075- xmlOutputBufferFlush (output_buf );
1075+ // Not necessary in 2.9.4+
1076+ //xmlOutputBufferFlush(output_buf);
10761077
10771078#ifdef LIBXML2_NEW_BUFFER
10781079
@@ -1082,6 +1083,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
10821083xmlOutputBufferClose (output_buf );
10831084xmlFreeDoc (msr -> crypto_html_tree );
10841085msr -> of_stream_changed = 0 ;
1086+ msr_log (msr ,4 ,"inject_hashed_response_body: NEW_BUFFER Output buffer is null." );
10851087return -1 ;
10861088 }
10871089
@@ -1096,6 +1098,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
10961098if (msr -> stream_output_data == NULL ) {
10971099xmlOutputBufferClose (output_buf );
10981100xmlFreeDoc (msr -> crypto_html_tree );
1101+ msr_log (msr ,4 ,"inject_hashed_response_body: NEW BUFFER Stream Output is null." );
10991102return -1 ;
11001103 }
11011104
@@ -1111,6 +1114,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
11111114xmlOutputBufferClose (output_buf );
11121115xmlFreeDoc (msr -> crypto_html_tree );
11131116msr -> of_stream_changed = 0 ;
1117+ msr_log (msr ,4 ,"inject_hashed_response_body: Conv is null." );
11141118return -1 ;
11151119 }
11161120
@@ -1123,6 +1127,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
11231127msr -> stream_output_data = (char * )malloc (msr -> stream_output_length + 1 );
11241128
11251129if (msr -> stream_output_data == NULL ) {
1130+ msr_log (msr ,4 ,"inject_hashed_response_body: Stream Output data is NULL." );
11261131xmlOutputBufferClose (output_buf );
11271132xmlFreeDoc (msr -> crypto_html_tree );
11281133return -1 ;
@@ -1143,6 +1148,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
11431148if (output_buf -> buffer == NULL || output_buf -> buffer -> use == 0 ) {
11441149xmlOutputBufferClose (output_buf );
11451150xmlFreeDoc (msr -> crypto_html_tree );
1151+ msr_log (msr ,4 ,"inject_hashed_response_body: Output buffer is null." );
11461152msr -> of_stream_changed = 0 ;
11471153return -1 ;
11481154 }
@@ -1158,6 +1164,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
11581164if (msr -> stream_output_data == NULL ) {
11591165xmlOutputBufferClose (output_buf );
11601166xmlFreeDoc (msr -> crypto_html_tree );
1167+ msr_log (msr ,4 ,"inject_hashed_response_body: Stream Output is null." );
11611168return -1 ;
11621169 }
11631170
@@ -1174,6 +1181,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
11741181xmlOutputBufferClose (output_buf );
11751182xmlFreeDoc (msr -> crypto_html_tree );
11761183msr -> of_stream_changed = 0 ;
1184+ msr_log (msr ,4 ,"inject_hashed_response_body: Stream Output is null." );
11771185return -1 ;
11781186 }
11791187
@@ -1188,6 +1196,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
11881196if (msr -> stream_output_data == NULL ) {
11891197xmlOutputBufferClose (output_buf );
11901198xmlFreeDoc (msr -> crypto_html_tree );
1199+ msr_log (msr ,4 ,"inject_hashed_response_body: Stream Output Data is null." );
11911200return -1 ;
11921201 }
11931202