mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-21 01:13:43 +08:00
Re-init rewrites var in convert_uri_to_file_name()
This commit is contained in:
parent
576d769b56
commit
1eb59940a4
@ -2233,6 +2233,7 @@ static int convert_uri_to_file_name(struct connection *conn, char *buf,
|
||||
|
||||
// Handle URL rewrites
|
||||
mg_snprintf(buf, buf_len, "%.*s%s", root_len, root, uri);
|
||||
rewrites = conn->server->config_options[URL_REWRITES]; // Re-initialize!
|
||||
while ((rewrites = next_option(rewrites, &a, &b)) != NULL) {
|
||||
if ((match_len = match_prefix(a.ptr, a.len, uri)) > 0) {
|
||||
mg_snprintf(buf, buf_len, "%.*s%s", (int) b.len, b.ptr, uri + match_len);
|
||||
|
Loading…
Reference in New Issue
Block a user