@@ -1072,7 +1072,8 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
1072
1072
}
1073
1073
1074
1074
htmlDocContentDumpFormatOutput (output_buf , msr -> crypto_html_tree , NULL , 0 );
1075
- xmlOutputBufferFlush (output_buf );
1075
+ // Not necessary in 2.9.4+
1076
+ //xmlOutputBufferFlush(output_buf);
1076
1077
1077
1078
#ifdef LIBXML2_NEW_BUFFER
1078
1079
@@ -1082,6 +1083,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
1082
1083
xmlOutputBufferClose (output_buf );
1083
1084
xmlFreeDoc (msr -> crypto_html_tree );
1084
1085
msr -> of_stream_changed = 0 ;
1086
+ msr_log (msr , 4 , "inject_hashed_response_body: NEW_BUFFER Output buffer is null." );
1085
1087
return -1 ;
1086
1088
}
1087
1089
@@ -1096,6 +1098,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
1096
1098
if (msr -> stream_output_data == NULL ) {
1097
1099
xmlOutputBufferClose (output_buf );
1098
1100
xmlFreeDoc (msr -> crypto_html_tree );
1101
+ msr_log (msr , 4 , "inject_hashed_response_body: NEW BUFFER Stream Output is null." );
1099
1102
return -1 ;
1100
1103
}
1101
1104
@@ -1111,6 +1114,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
1111
1114
xmlOutputBufferClose (output_buf );
1112
1115
xmlFreeDoc (msr -> crypto_html_tree );
1113
1116
msr -> of_stream_changed = 0 ;
1117
+ msr_log (msr , 4 , "inject_hashed_response_body: Conv is null." );
1114
1118
return -1 ;
1115
1119
}
1116
1120
@@ -1123,6 +1127,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
1123
1127
msr -> stream_output_data = (char * )malloc (msr -> stream_output_length + 1 );
1124
1128
1125
1129
if (msr -> stream_output_data == NULL ) {
1130
+ msr_log (msr , 4 , "inject_hashed_response_body: Stream Output data is NULL." );
1126
1131
xmlOutputBufferClose (output_buf );
1127
1132
xmlFreeDoc (msr -> crypto_html_tree );
1128
1133
return -1 ;
@@ -1143,6 +1148,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
1143
1148
if (output_buf -> buffer == NULL || output_buf -> buffer -> use == 0 ) {
1144
1149
xmlOutputBufferClose (output_buf );
1145
1150
xmlFreeDoc (msr -> crypto_html_tree );
1151
+ msr_log (msr , 4 , "inject_hashed_response_body: Output buffer is null." );
1146
1152
msr -> of_stream_changed = 0 ;
1147
1153
return -1 ;
1148
1154
}
@@ -1158,6 +1164,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
1158
1164
if (msr -> stream_output_data == NULL ) {
1159
1165
xmlOutputBufferClose (output_buf );
1160
1166
xmlFreeDoc (msr -> crypto_html_tree );
1167
+ msr_log (msr , 4 , "inject_hashed_response_body: Stream Output is null." );
1161
1168
return -1 ;
1162
1169
}
1163
1170
@@ -1174,6 +1181,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
1174
1181
xmlOutputBufferClose (output_buf );
1175
1182
xmlFreeDoc (msr -> crypto_html_tree );
1176
1183
msr -> of_stream_changed = 0 ;
1184
+ msr_log (msr , 4 , "inject_hashed_response_body: Stream Output is null." );
1177
1185
return -1 ;
1178
1186
}
1179
1187
@@ -1188,6 +1196,7 @@ int inject_hashed_response_body(modsec_rec *msr, int elts) {
1188
1196
if (msr -> stream_output_data == NULL ) {
1189
1197
xmlOutputBufferClose (output_buf );
1190
1198
xmlFreeDoc (msr -> crypto_html_tree );
1199
+ msr_log (msr , 4 , "inject_hashed_response_body: Stream Output Data is null." );
1191
1200
return -1 ;
1192
1201
}
1193
1202
0 commit comments