summaryrefslogtreecommitdiff
path: root/src/mod_rewrite.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2016-04-14 06:29:50 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2016-04-14 16:01:45 -0400
commit186e7073fbccc04a496ef27f987f69b81ed87107 (patch)
tree677408bccf5fb8c347cf4989e34c308d01e062b7 /src/mod_rewrite.c
parentfa3a36ffd444c07fda70796c7c178b0188e8ddad (diff)
downloadlighttpd-git-186e7073fbccc04a496ef27f987f69b81ed87107.tar.gz
[mod_redirect,mod-rewrite] short-circuit if blank replacement (fixes #2085)
x-ref: "null redirects for mod_redirect" https://redmine.lighttpd.net/issues/2085
Diffstat (limited to 'src/mod_rewrite.c')
-rw-r--r--src/mod_rewrite.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mod_rewrite.c b/src/mod_rewrite.c
index fac6c49f..faa7f841 100644
--- a/src/mod_rewrite.c
+++ b/src/mod_rewrite.c
@@ -383,6 +383,10 @@ static handler_t process_rewrite_rules(server *srv, connection *con, plugin_data
"execution error while matching: ", n);
return HANDLER_ERROR;
}
+ } else if (0 == pattern_len) {
+ /* short-circuit if blank replacement pattern
+ * (do not attempt to match against remaining rewrite rules) */
+ return HANDLER_GO_ON;
} else {
const char **list;
size_t start;