From 345462a45f4ed7de072b5745d8056230e442f541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Mon, 22 Sep 2008 10:16:55 +0000 Subject: [PATCH] Use decoded url for matching in mod_redirect (#1720) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2309 152afb58-edef-0310-8abb-c4023f1b3aa9 --- NEWS | 1 + src/mod_redirect.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6544254e..2f657345 100644 --- a/NEWS +++ b/NEWS @@ -64,6 +64,7 @@ NEWS * fix auth.backend.ldap.bind-dn/pw problems (only read from global context for temporary ldap reconnects, thx ruskie) * fix memleak in request header parsing (#1774, thx qhy) * fix mod_rewrite memleak/endless loop detection (#1775, thx phy - again!) + * use decoded url for matching in mod_redirect (#1720) - 1.4.19 - 2008-03-10 diff --git a/src/mod_redirect.c b/src/mod_redirect.c index d5f78640..2c641032 100644 --- a/src/mod_redirect.c +++ b/src/mod_redirect.c @@ -178,7 +178,11 @@ static handler_t mod_redirect_uri_handler(server *srv, connection *con, void *p_ mod_redirect_patch_connection(srv, con, p); - buffer_copy_string_buffer(p->match_buf, con->request.uri); + buffer_copy_string_buffer(p->match_buf, con->uri.path); + if (con->uri.query->used > 0) { + buffer_append_string_len(p->match_buf, CONST_STR_LEN("?")); + buffer_append_string_buffer(p->match_buf, con->uri.query); + } for (i = 0; i < p->conf.redirect->used; i++) { pcre *match;