diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-01-08 23:35:39 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-07-08 19:54:29 -0400 |
commit | 8131e4396dcec676d8e7b681cee10003f1c4fefd (patch) | |
tree | af75315c4dbd4c0cf3fa2e93bfbcc353f9b88348 /src/mod_rewrite.c | |
parent | 1474be78592e0b6566ae23002ab760c6d493c28e (diff) | |
download | lighttpd-git-8131e4396dcec676d8e7b681cee10003f1c4fefd.tar.gz |
[core] move addtl request-specific struct members
Diffstat (limited to 'src/mod_rewrite.c')
-rw-r--r-- | src/mod_rewrite.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mod_rewrite.c b/src/mod_rewrite.c index 1070bd66..27e55d91 100644 --- a/src/mod_rewrite.c +++ b/src/mod_rewrite.c @@ -275,8 +275,9 @@ static handler_t process_rewrite_rules(connection *con, plugin_data *p, const pc ctx.cache = NULL; if (kvb->x0) { /*(kvb->x0 is context_idx)*/ - ctx.cond_match_count = con->cond_cache[kvb->x0].patterncount; - ctx.cache = con->cond_match + kvb->x0; + ctx.cond_match_count = + con->request.cond_cache[kvb->x0].patterncount; + ctx.cache = con->request.cond_match + kvb->x0; } ctx.burl = &burl; burl.scheme = con->uri.scheme; @@ -285,12 +286,12 @@ static handler_t process_rewrite_rules(connection *con, plugin_data *p, const pc burl.path = con->uri.path_raw; burl.query = con->uri.query; if (buffer_string_is_empty(burl.authority)) - burl.authority = con->server_name; + burl.authority = con->request.server_name; buffer * const tb = con->srv->tmp_buf; - rc = pcre_keyvalue_buffer_process(kvb, &ctx, con->request.uri, tb); + rc = pcre_keyvalue_buffer_process(kvb, &ctx, con->request.target, tb); if (HANDLER_FINISHED == rc && !buffer_is_empty(tb) && tb->ptr[0] == '/') { - buffer_copy_buffer(con->request.uri, tb); + buffer_copy_buffer(con->request.target, tb); uintptr_t * const hctx = (uintptr_t *)(con->plugin_ctx + p->id); *hctx |= REWRITE_STATE_REWRITTEN; /*(kvb->x1 is repeat_idx)*/ @@ -302,12 +303,12 @@ static handler_t process_rewrite_rules(connection *con, plugin_data *p, const pc rc = HANDLER_ERROR; log_error(con->conf.errh, __FILE__, __LINE__, "mod_rewrite invalid result (not beginning with '/') " - "while processing uri: %s", con->request.uri->ptr); + "while processing uri: %s", con->request.target->ptr); } else if (HANDLER_ERROR == rc) { log_error(con->conf.errh, __FILE__, __LINE__, "pcre_exec() error " - "while processing uri: %s", con->request.uri->ptr); + "while processing uri: %s", con->request.target->ptr); } return rc; } |