aboutsummaryrefslogtreecommitdiffhomepage
path: root/pingora-proxy/src/lib.rs
diff options
context:
space:
mode:
authorYuchen Wu <[email protected]>2024-03-29 15:42:20 -0700
committerAndrew Hauck <[email protected]>2024-04-05 11:46:20 -0700
commitdfcd3d1d9f493b830e97757ba8d43c07ee81c030 (patch)
tree0cfa357cd4257b0ea2b7c2d116c937426190b1cd /pingora-proxy/src/lib.rs
parent3c5d99c3f49a8d40a0fc16895b148dea9ea18e8d (diff)
downloadpingora-dfcd3d1d9f493b830e97757ba8d43c07ee81c030.tar.gz
pingora-dfcd3d1d9f493b830e97757ba8d43c07ee81c030.zip
Fix typos and grammar issues in docs
And other things. Co-authored-by: DimanNe <[email protected]> Co-authored-by: Xiaobo Liu <[email protected]> Co-authored-by: houseme <[email protected]> Co-authored-by: lilo <[email protected]> Co-authored-by: Yang He <[email protected]>
Diffstat (limited to 'pingora-proxy/src/lib.rs')
-rw-r--r--pingora-proxy/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/pingora-proxy/src/lib.rs b/pingora-proxy/src/lib.rs
index 9ecac87..930087d 100644
--- a/pingora-proxy/src/lib.rs
+++ b/pingora-proxy/src/lib.rs
@@ -114,7 +114,7 @@ impl<SV> HttpProxy<SV> {
// phase 1 read request header
let res = tokio::select! {
- biased; // biased select is cheaper and we don't want to drop already buffered requests
+ biased; // biased select is cheaper, and we don't want to drop already buffered requests
res = downstream_session.read_request() => { res }
_ = self.shutdown.notified() => {
// service shutting down, dropping the connection to stop more req from coming in
@@ -416,7 +416,7 @@ impl<SV> HttpProxy<SV> {
{
Ok(proxy_to_upstream) => {
if !proxy_to_upstream {
- // The hook can choose to write its own response, but if it doesn't we respond
+ // The hook can choose to write its own response, but if it doesn't, we respond
// with a generic 502
if session.response_written().is_none() {
match session.write_response_header_ref(&BAD_GATEWAY).await {
@@ -489,7 +489,7 @@ impl<SV> HttpProxy<SV> {
}
// serve stale if error
- // check both error and cache before calling the function because await is not cheap
+ // Check both error and cache before calling the function because await is not cheap
let serve_stale_result = if proxy_error.is_some() && session.cache.can_serve_stale_error() {
self.handle_stale_if_error(&mut session, &mut ctx, proxy_error.as_ref().unwrap())
.await
@@ -562,7 +562,7 @@ where
None => return, // bad request
};
- // no real downstream to keepalive but it doesn't matter what is set here because at the end
+ // no real downstream to keepalive, but it doesn't matter what is set here because at the end
// of this fn the dummy connection will be dropped
session.set_keepalive(None);
@@ -606,7 +606,7 @@ where
}
fn http_cleanup(&self) {
- // Notify all keepalived request blocking on read_request() to abort
+ // Notify all keepalived requests blocking on read_request() to abort
self.shutdown.notify_waiters();
// TODO: impl shutting down flag so that we don't need to read stack.is_shutting_down()