diff --git a/src/transaction.cc b/src/transaction.cc index 31d32eb5..c71bb15f 100644 --- a/src/transaction.cc +++ b/src/transaction.cc @@ -876,7 +876,7 @@ int Transaction::processResponseHeaders(int code, const std::string& proto) { #endif this->m_httpCodeReturned = code; - this->m_collections.store("STATUS", std::to_string(code)); + this->m_collections.store("RESPONSE_STATUS", std::to_string(code)); m_collections.store("RESPONSE_PROTOCOL", proto); if (m_rules->m_secRuleEngine == Rules::DisabledRuleEngine) { diff --git a/test/test-cases/regression/variable-STATUS.json b/test/test-cases/regression/variable-STATUS.json index 57a52d51..9e451f73 100644 --- a/test/test-cases/regression/variable-STATUS.json +++ b/test/test-cases/regression/variable-STATUS.json @@ -36,11 +36,11 @@ ] }, "expected":{ - "debug_log":"Target value: \"200\" \\(Variable: STATUS\\)" + "debug_log":"Target value: \"200\" \\(Variable: RESPONSE_STATUS\\)" }, "rules":[ "SecRuleEngine On", - "SecRule STATUS \"@contains test\" \"id:1,phase:5,rev:1.3,pass,t:trim\"" + "SecRule RESPONSE_STATUS \"@contains test\" \"id:1,phase:5,rev:1.3,pass,t:trim\"" ] }, { @@ -80,13 +80,13 @@ ] }, "expected":{ - "debug_log":"Target value: \"500\" \\(Variable: STATUS\\)", + "debug_log":"Target value: \"500\" \\(Variable: RESPONSE_STATUS\\)", "http_code": 500 }, "rules":[ "SecRuleEngine On", "SecRule ARGS \"@pm value\" \"id:1,phase:2,t:trim,status:500,deny\"", - "SecRule STATUS \"@contains test\" \"id:2,phase:5,rev:1.3,pass,t:trim\"" + "SecRule RESPONSE_STATUS \"@contains test\" \"id:2,phase:5,rev:1.3,pass,t:trim\"" ] } ]