Option to disable logging of dechunking

This commit is contained in:
Marc Stern
2017-05-02 11:09:10 -03:00
committed by Felipe Zimmerle
parent a4724dfdab
commit d7383c39dd
3 changed files with 24 additions and 1 deletions

View File

@@ -1170,6 +1170,9 @@ void sec_audit_logger_json(modsec_rec *msr) {
/* Our response body does not contain chunks */
/* ENH Only write this when the output was chunked. */
/* ENH Add info when request body was decompressed, dechunked too. */
#ifdef LOG_NO_DECHUNK
if (msr->txcfg->debuglog_level >= 9)
#endif
if (wrote_response_body) {
yajl_kv_bool(g, "response_body_dechunked", 1);
}
@@ -2002,6 +2005,9 @@ void sec_audit_logger_native(modsec_rec *msr) {
/* Our response body does not contain chunks */
/* ENH Only write this when the output was chunked. */
/* ENH Add info when request body was decompressed, dechunked too. */
#ifdef LOG_NO_DECHUNK
if (msr->txcfg->debuglog_level >= 9)
#endif
if (wrote_response_body) {
text = apr_psprintf(msr->mp, "Response-Body-Transformed: Dechunked\n");
sec_auditlog_write(msr, text, strlen(text));