From 8160ad169878ea6b4884b977f2a96541083036c4 Mon Sep 17 00:00:00 2001 From: Yuchen Wu Date: Fri, 1 Mar 2024 11:51:14 -0800 Subject: Fix typos and grammar issues Co-authored-by: =?~~~?q?Ren=C3=A9=20Kla=C4=8Dan?= Co-authored-by: 12932 <68835423+12932@users.noreply.github.com> Co-authored-by: Alessandro Co-authored-by: InImpasse <40639475+InImpasse@users.noreply.github.com> Co-authored-by: Paul James Cleary Co-authored-by: Yang Hau Co-authored-by: Morpheus <40785143+Muzych@users.noreply.github.com> Co-authored-by: mobeicanyue <81098819+mobeicanyue@users.noreply.github.com> Co-authored-by: Twacqwq <69360546+Twacqwq@users.noreply.github.com> Co-authored-by: Bobby Co-authored-by: Dup4 Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Sheldon <1415182877@qq.com> Co-authored-by: houseme Co-authored-by: ZhangIvan1 Co-authored-by: GrahamQuan <33834833+GrahamQuan@users.noreply.github.com> Co-authored-by: =?~~~?q?Cristian=20Paul=20Pe=C3=B1aranda=20Rojas?= Co-authored-by: Nathan Sit Co-authored-by: David Lee <67067729+LordMoMA@users.noreply.github.com> Co-authored-by: Mengliang Su Co-authored-by: =?~~~?q?=EA=B9=80=EC=84=A0=EC=9A=B0?= Co-authored-by: Allen Huang Co-authored-by: Opacity <70315161+zreren@users.noreply.github.com> Co-authored-by: cris Co-authored-by: Killian Ye <40255385+ykw1129@users.noreply.github.com> Co-authored-by: Jiwei-dev Co-authored-by: Jinfeng Wang <41931794+wjf40390@users.noreply.github.com> Co-authored-by: Ikko Eltociear Ashimine --- pingora-proxy/src/lib.rs | 2 +- pingora-proxy/src/proxy_cache.rs | 8 ++++---- pingora-proxy/tests/utils/conf/origin/conf/nginx.conf | 4 ++-- pingora-proxy/tests/utils/server_utils.rs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'pingora-proxy') diff --git a/pingora-proxy/src/lib.rs b/pingora-proxy/src/lib.rs index d1aa399..9ecac87 100644 --- a/pingora-proxy/src/lib.rs +++ b/pingora-proxy/src/lib.rs @@ -594,7 +594,7 @@ where }; if *shutdown.borrow() { - // stop downstream downstream from reusing if this service is shutting down soon + // stop downstream from reusing if this service is shutting down soon session.set_keepalive(None); } else { // default 60s diff --git a/pingora-proxy/src/proxy_cache.rs b/pingora-proxy/src/proxy_cache.rs index 0dba682..4546b58 100644 --- a/pingora-proxy/src/proxy_cache.rs +++ b/pingora-proxy/src/proxy_cache.rs @@ -220,7 +220,7 @@ impl HttpProxy { } Err(e) => { // Allow cache miss to fill cache even if cache lookup errors - // this is mostly to suppport backward incompatible metadata update + // this is mostly to support backward incompatible metadata update // TODO: check error types // session.cache.disable(); self.inner.cache_miss(session, ctx); @@ -280,7 +280,7 @@ impl HttpProxy { Err(e) => { // TODO: more logging and error handling session.as_mut().respond_error(500).await; - // we have not write anything dirty to downstream, it is still reuseable + // we have not write anything dirty to downstream, it is still reusable return (true, Some(e)); } } @@ -724,7 +724,7 @@ pub(crate) mod range_filter { use http::header::*; use std::ops::Range; - // parse bytes into usize, ignores specifc error + // parse bytes into usize, ignores specific error fn parse_number(input: &[u8]) -> Option { str::from_utf8(input).ok()?.parse().ok() } @@ -734,7 +734,7 @@ pub(crate) mod range_filter { // single byte range only for now // https://datatracker.ietf.org/doc/html/rfc7233#section-2.1 - // https://datatracker.ietf.org/doc/html/rfc7233#appendix-C: case insensitive + // https://datatracker.ietf.org/doc/html/rfc7233#appendix-C: case-insensitive static RE_SINGLE_RANGE: Lazy = Lazy::new(|| Regex::new(r"(?i)bytes=(?P\d*)-(?P\d*)").unwrap()); diff --git a/pingora-proxy/tests/utils/conf/origin/conf/nginx.conf b/pingora-proxy/tests/utils/conf/origin/conf/nginx.conf index b0ab281..6e55d30 100644 --- a/pingora-proxy/tests/utils/conf/origin/conf/nginx.conf +++ b/pingora-proxy/tests/utils/conf/origin/conf/nginx.conf @@ -253,7 +253,7 @@ http { return 200; } - # 1. A origin load balancer that rejects reused connetions. + # 1. A origin load balancer that rejects reused connections. # this is to simulate the common problem when customers LB drops # connection silently after being keepalived for awhile # 2. A middlebox might drop the connection if the origin takes too long @@ -283,7 +283,7 @@ http { ngx.print(string.rep("A", 64)) ngx.print(string.rep("A", 64)) ngx.print(string.rep("A", 64)) - -- without ngx.req.read_body(), the body will return wihtout waiting for req body + -- without ngx.req.read_body(), the body will return without waiting for req body } } diff --git a/pingora-proxy/tests/utils/server_utils.rs b/pingora-proxy/tests/utils/server_utils.rs index e3aafe7..32f3275 100644 --- a/pingora-proxy/tests/utils/server_utils.rs +++ b/pingora-proxy/tests/utils/server_utils.rs @@ -412,7 +412,7 @@ impl Server { } } -// FIXME: this still allows multiple servers to spawn across intergration tests +// FIXME: this still allows multiple servers to spawn across integration tests pub static TEST_SERVER: Lazy = Lazy::new(Server::start); use super::mock_origin::MOCK_ORIGIN; -- cgit v1.2.3