summaryrefslogtreecommitdiffstats
path: root/modules/proxy/mod_proxy.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-09-24 17:52:50 +0200
committerYann Ylavic <ylavic@apache.org>2021-09-24 17:52:50 +0200
commit3d2842e915d26a226a1524db8a718c9c9e2a57bc (patch)
tree28e9e0f66789f7eedb1a198eda625aee83cb32c8 /modules/proxy/mod_proxy.c
parentmod_proxy: Handle ap_proxy_buckets_lifetime_transform() errors. (diff)
downloadapache2-3d2842e915d26a226a1524db8a718c9c9e2a57bc.tar.xz
apache2-3d2842e915d26a226a1524db8a718c9c9e2a57bc.zip
mod_proxy: Add tunnel_forward hook.
* modules/proxy/mod_proxy.h, modules/proxy/mod_proxy.c: Declare/implement the hook. * modules/proxy/proxy_util.c(proxy_transfer): Run tunnel_forward hooks when called by the tunneling loop. Simpler input/output brigade cleanup on exit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893603 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy/mod_proxy.c')
-rw-r--r--modules/proxy/mod_proxy.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index a4b0ce894c..035f52cb50 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -3474,6 +3474,7 @@ APR_HOOK_STRUCT(
APR_HOOK_LINK(post_request)
APR_HOOK_LINK(request_status)
APR_HOOK_LINK(check_trans)
+ APR_HOOK_LINK(tunnel_forward)
)
APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, scheme_handler,
@@ -3517,3 +3518,9 @@ APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(proxy, PROXY, int, request_status,
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(proxy, PROXY, int, detach_backend,
(request_rec *r, proxy_conn_rec *backend),
(r, backend), OK, DECLINED)
+APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(proxy, PROXY, int, tunnel_forward,
+ (proxy_tunnel_rec *tunnel,
+ conn_rec *c_i, conn_rec *c_o,
+ apr_bucket_brigade *bb),
+ (tunnel, c_i, c_o, bb),
+ OK, DECLINED)