From 1eb59940a471fe78e2e11d33092d655ee865a902 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Sun, 9 Mar 2014 13:27:39 +0000 Subject: [PATCH] Re-init rewrites var in convert_uri_to_file_name() --- mongoose.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mongoose.c b/mongoose.c index 270ef1f5..c8fa690f 100644 --- a/mongoose.c +++ b/mongoose.c @@ -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);