aboutsummaryrefslogtreecommitdiffhomepage
path: root/pingora-proxy/src/proxy_trait.rs
diff options
context:
space:
mode:
Diffstat (limited to 'pingora-proxy/src/proxy_trait.rs')
-rw-r--r--pingora-proxy/src/proxy_trait.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/pingora-proxy/src/proxy_trait.rs b/pingora-proxy/src/proxy_trait.rs
index b98fff0..80686e8 100644
--- a/pingora-proxy/src/proxy_trait.rs
+++ b/pingora-proxy/src/proxy_trait.rs
@@ -20,7 +20,7 @@ use pingora_cache::{key::HashBinary, CacheKey, CacheMeta, RespCacheable, RespCac
/// The methods in [ProxyHttp] are filters/callbacks which will be performed on all requests at their
/// particular stage (if applicable).
///
-/// If any of the filters returns [Result::Err], the request will fail and the error will be logged.
+/// If any of the filters returns [Result::Err], the request will fail, and the error will be logged.
#[cfg_attr(not(doc_async_trait), async_trait)]
pub trait ProxyHttp {
/// The per request object to share state across the different filters
@@ -29,7 +29,7 @@ pub trait ProxyHttp {
/// Define how the `ctx` should be created.
fn new_ctx(&self) -> Self::CTX;
- /// Define where the proxy should sent the request to.
+ /// Define where the proxy should send the request to.
///
/// The returned [HttpPeer] contains the information regarding where and how this request should
/// be forwarded to.
@@ -44,7 +44,7 @@ pub trait ProxyHttp {
/// In this phase, users can parse, validate, rate limit, perform access control and/or
/// return a response for this request.
///
- /// If the user already sent a response to this request, a `Ok(true)` should be returned so that
+ /// If the user already sent a response to this request, an `Ok(true)` should be returned so that
/// the proxy would exit. The proxy continues to the next phases when `Ok(false)` is returned.
///
/// By default this filter does nothing and returns `Ok(false)`.
@@ -156,7 +156,7 @@ pub trait ProxyHttp {
/// Modify the response header from the upstream
///
- /// The modification is before caching so any change here will be stored in cache if enabled.
+ /// The modification is before caching, so any change here will be stored in the cache if enabled.
///
/// Responses served from cache won't trigger this filter. If the cache needed revalidation,
/// only the 304 from upstream will trigger the filter (though it will be merged into the
@@ -172,7 +172,7 @@ pub trait ProxyHttp {
/// Modify the response header before it is send to the downstream
///
/// The modification is after caching. This filter is called for all responses including
- /// responses served from cache..
+ /// responses served from cache.
async fn response_filter(
&self,
_session: &mut Session,
@@ -351,7 +351,7 @@ pub trait ProxyHttp {
/// This callback is invoked every time request related error log needs to be generated
///
- /// Users can define what is the important to be written about this request via the returned string.
+ /// Users can define what is important to be written about this request via the returned string.
fn request_summary(&self, session: &Session, _ctx: &Self::CTX) -> String {
session.as_ref().request_summary()
}
@@ -359,7 +359,7 @@ pub trait ProxyHttp {
/// Whether the request should be used to invalidate(delete) the HTTP cache
///
/// - `true`: this request will be used to invalidate the cache.
- /// - `false`: this request is a treated as an normal request
+ /// - `false`: this request is a treated as a normal request
fn is_purge(&self, _session: &Session, _ctx: &Self::CTX) -> bool {
false
}