From 65b1d6c733babb74df1b4bdf6a0c5e5c8e1b7a6a Mon Sep 17 00:00:00 2001 From: Yuchen Wu Date: Tue, 25 Jun 2024 16:25:22 -0700 Subject: Invoke request_body_filter of modules for proxies --- .bleep | 2 +- pingora-proxy/src/proxy_h1.rs | 5 +++++ pingora-proxy/src/proxy_h2.rs | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.bleep b/.bleep index 68106ae..590f480 100644 --- a/.bleep +++ b/.bleep @@ -1 +1 @@ -9ec5f295aba1ec889914afb8c3cbb44724a516f1 \ No newline at end of file +00504ca4d524990b3a1b53bbeb42824c3fbdcfe9 \ No newline at end of file diff --git a/pingora-proxy/src/proxy_h1.rs b/pingora-proxy/src/proxy_h1.rs index de49c03..1dbb561 100644 --- a/pingora-proxy/src/proxy_h1.rs +++ b/pingora-proxy/src/proxy_h1.rs @@ -546,6 +546,11 @@ impl HttpProxy { // affected by the request_body_filter let end_of_body = end_of_body || data.is_none(); + session + .downstream_modules_ctx + .request_body_filter(&mut data, end_of_body) + .await?; + self.inner .request_body_filter(session, &mut data, end_of_body, ctx) .await?; diff --git a/pingora-proxy/src/proxy_h2.rs b/pingora-proxy/src/proxy_h2.rs index c213857..5216ee9 100644 --- a/pingora-proxy/src/proxy_h2.rs +++ b/pingora-proxy/src/proxy_h2.rs @@ -525,6 +525,11 @@ impl HttpProxy { SV: ProxyHttp + Send + Sync, SV::CTX: Send + Sync, { + session + .downstream_modules_ctx + .request_body_filter(&mut data, end_of_body) + .await?; + self.inner .request_body_filter(session, &mut data, end_of_body, ctx) .await?; -- cgit v1.2.3