Skip to content

Commit e1e8a01

Browse files
author
Felipe Zimmerle
committed
Override the default status code if not suitable to redirect action
Issue #1850
1 parent bfe917b commit e1e8a01

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
v3.0.3 - YYYY-MMM-DD (to be released)
22
-------------------------------------
33

4+
- Override the default status code if not suitable to redirect action
5+
[Issue #1850 - @zimmerle, @victorhora]
46
- parser: Fix the support for CRLF configuration files
57
[Issue #1945 - @zimmerle, @defanator, @kjakub]
68
- Organizes the server logs

others/libinjection

Submodule libinjection updated 72 files

src/actions/disruptive/redirect.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ bool Redirect::evaluate(Rule *rule, Transaction *transaction,
3838
std::shared_ptr<RuleMessage> rm) {
3939
std::string m_urlExpanded(m_string->evaluate(transaction));
4040
/* if it was changed before, lets keep it. */
41-
if (transaction->m_it.status == 200) {
41+
if (transaction->m_it.status == 200
42+
|| (!(transaction->m_it.status <= 307 && transaction->m_it.status >= 301))) {
4243
transaction->m_it.status = m_status;
4344
}
4445

0 commit comments

Comments
 (0)