aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEdward Wang <[email protected]>2024-11-04 15:08:56 -0800
committerEdward Wang <[email protected]>2024-11-04 21:02:17 -0800
commite89f198243b0b375383eacff7d2eed48d019c398 (patch)
tree879a0ce23bd0fd60e037ab05fb63759d9afe362d
parentee42db5e5d7fe2569111528a3c4e5fba240caf38 (diff)
downloadpingora-e89f198243b0b375383eacff7d2eed48d019c398.tar.gz
pingora-e89f198243b0b375383eacff7d2eed48d019c398.zip
Allow errors from upstream_response_body_filter
-rw-r--r--.bleep2
-rw-r--r--pingora-proxy/src/lib.rs2
-rw-r--r--pingora-proxy/src/proxy_trait.rs3
3 files changed, 4 insertions, 3 deletions
diff --git a/.bleep b/.bleep
index 51c1503..1e3b918 100644
--- a/.bleep
+++ b/.bleep
@@ -1 +1 @@
-a76fd1ca898a9518c6aa0c7c8fa5ed845dd1bcbb \ No newline at end of file
+4a86ea20bc7d70669a7be7b3b316139cbe74e648 \ No newline at end of file
diff --git a/pingora-proxy/src/lib.rs b/pingora-proxy/src/lib.rs
index 5621170..f13a1f7 100644
--- a/pingora-proxy/src/lib.rs
+++ b/pingora-proxy/src/lib.rs
@@ -250,7 +250,7 @@ impl<SV> HttpProxy<SV> {
}
HttpTask::Body(data, eos) => self
.inner
- .upstream_response_body_filter(session, data, *eos, ctx),
+ .upstream_response_body_filter(session, data, *eos, ctx)?,
HttpTask::Trailer(Some(trailers)) => self
.inner
.upstream_response_trailer_filter(session, trailers, ctx)?,
diff --git a/pingora-proxy/src/proxy_trait.rs b/pingora-proxy/src/proxy_trait.rs
index 4f3f627..4017789 100644
--- a/pingora-proxy/src/proxy_trait.rs
+++ b/pingora-proxy/src/proxy_trait.rs
@@ -267,7 +267,8 @@ pub trait ProxyHttp {
_body: &mut Option<Bytes>,
_end_of_stream: bool,
_ctx: &mut Self::CTX,
- ) {
+ ) -> Result<()> {
+ Ok(())
}
/// Similar to [Self::upstream_response_filter()] but for response trailers