summaryrefslogtreecommitdiff
path: root/src/mod_proxy.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-01-11 00:54:31 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2020-07-08 19:54:29 -0400
commit31d9495330fe6242738cdc873a71153dcb03939a (patch)
tree53873e16b998747723f4c7c59e49108dcabab19b /src/mod_proxy.c
parenteea7cd3c2f576d1cff6850fa208adc5ee00468e5 (diff)
downloadlighttpd-git-31d9495330fe6242738cdc873a71153dcb03939a.tar.gz
[core] store subrequest_handler instead of mode
store pointer to module in handler_module instead of con->mode id
Diffstat (limited to 'src/mod_proxy.c')
-rw-r--r--src/mod_proxy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_proxy.c b/src/mod_proxy.c
index a6aa7f14..20faccbb 100644
--- a/src/mod_proxy.c
+++ b/src/mod_proxy.c
@@ -1022,7 +1022,7 @@ static handler_t mod_proxy_check_extension(connection *con, void *p_d) {
plugin_data *p = p_d;
handler_t rc;
- if (con->mode != DIRECT) return HANDLER_GO_ON;
+ if (NULL != con->response.handler_module) return HANDLER_GO_ON;
mod_proxy_patch_config(con, p);
if (NULL == p->conf.gw.exts) return HANDLER_GO_ON;
@@ -1030,7 +1030,7 @@ static handler_t mod_proxy_check_extension(connection *con, void *p_d) {
rc = gw_check_extension(con, (gw_plugin_data *)p, 1, sizeof(handler_ctx));
if (HANDLER_GO_ON != rc) return rc;
- if (con->mode == p->id) {
+ if (con->response.handler_module == p->self) {
handler_ctx *hctx = con->request.plugin_ctx[p->id];
hctx->gw.create_env = proxy_create_env;
hctx->gw.response = chunk_buffer_acquire();
@@ -1058,7 +1058,7 @@ static handler_t mod_proxy_check_extension(connection *con, void *p_d) {
}
else {
con->http_status = 405; /* Method Not Allowed */
- con->mode = DIRECT;
+ con->response.handler_module = NULL;
return HANDLER_FINISHED;
}
}