ewang
7b838b8118
Add a convenience function to retrieve Session digest
2024-04-22 08:48:19 -07:00
ewang
cfb86c3f16
Add body_bytes_read() method to Session
...
Add an API to retrieve request body bytes read so far.
2024-04-22 08:48:19 -07:00
Matthew Gumport
a8b6bbe9f4
address string interpolation outside of proper context
...
https://github.com/cloudflare/pingora/issues/181
Ran:
```
rg --pcre2 '(?<!(trace\!\()|(println\!\()|(warn\!\()|(info\!\()|(debug\!\()|(format\!\()|(error\!\()|(write\!\()|(panic\!\())\".*\{.+\"'
```
and audited the 200+ results by hand. Only messed up in a few places!
Hat-tip to Kevin for helping me understand the compile error messages I was
seeing trying to fix this naively.
2024-04-22 08:48:19 -07:00
Yesterday17
6e6b4f6705
Replace splitn(2)
with split_once
...
---
Do not trim value
Includes-commit: 7431d24402
Includes-commit: fdf61307a3
Replicated-from: https://github.com/cloudflare/pingora/pull/177
2024-04-22 08:48:19 -07:00
gengteng
a680ccee41
feat: Change Server::run_forever to take ownership and ensure exit semantics
...
Includes-commit: b83da0f03e
Replicated-from: https://github.com/cloudflare/pingora/pull/176
2024-04-22 08:48:19 -07:00
Andrew Hauck
fca0532950
Add tls upstream support for SSLKEYLOG to allow decryption of traffic for debugging purposes
2024-04-12 15:43:32 -07:00
ewang
3f682ea37f
Add cache_not_modified_filter, handle etag/last-modified
...
This filter allows customizing the `ETag`/`Last-Modified` check to see
if the proxy cache can return 304 Not Modified instead of the full
response.
Also flesh out the `ETag`/`Last-Modified` handling in the base
`not_modified_filter` with `If-None-Match` and `If-Modified-Since`.
2024-04-12 15:30:28 -07:00
Yuchen Wu
dfcd3d1d9f
Fix typos and grammar issues in docs
...
And other things.
Co-authored-by: DimanNe <causal.consistency@proton.me>
Co-authored-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: houseme <housemecn@gmail.com>
Co-authored-by: lilo <luolee.me@gmail.com>
Co-authored-by: Yang He <abruzzi.hraig@gmail.com>
2024-04-05 11:46:20 -07:00
ewang
c2d0c80495
Add ServerConf::merge_with_opt for when Opt/ServerConf are used together
2024-04-05 11:46:20 -07:00
ewang
9156ea7d5b
Add doc comments for unstable fields in ServerConf
2024-04-05 11:46:20 -07:00
James Munns
b02729272a
Expose currently pub(crate) configuration options, provide new Server constructor
...
---
Also expose the Version field
Includes-commit: acbc9e533b
Includes-commit: d8fb7dbe75
Replicated-from: https://github.com/cloudflare/pingora/pull/165
2024-04-05 11:46:20 -07:00
Benjamin Halsted
b26d59983c
Fix voldemort types in public interface
...
The `Fds` struct used in `ListenFds` in the `pingora::services::Service` trait
is not nameable. See https://rust-lang.github.io/rfcs/2145-type-privacy.html#~~~-voldemort-types-its-reachable-but-i-cant-name-it
This change makes both `ListenFds` and `Fds` public.
As a side-effect all of the methods on `Fds` are now public as well but are not documented.
Fixes: https://github.com/cloudflare/pingora/issues/145
Replicated-from: https://github.com/cloudflare/pingora/pull/146
Includes-commit: 6f835a357b
2024-04-05 11:46:20 -07:00
Hiroaki Nakamura
c61b83b745
Add config for grace period and graceful shutdown timeout
...
---
test: initialize ServerConf with added new fields
Replicated-from: https://github.com/cloudflare/pingora/pull/99
Includes-commit: f0dc59aeae
Includes-commit: c37e63bdbe
2024-04-05 11:46:20 -07:00
Andrew Hauck
6a8196ba64
Use escape_default() and limit the buffer size for InvalidHTTPHeader errors when reading requests
2024-04-05 11:46:20 -07:00
Kevin Guthrie
0de54eb907
Refactoring external change to address code-review comments
2024-03-22 15:00:53 -07:00
gengteng
247ce6c4b0
feat: implement Keep-Alive header parsing in Session
...
Replicated-from: https://github.com/cloudflare/pingora/pull/24
Includes-commit: 357c1b95d9
2024-03-22 15:00:53 -07:00
ewang
ff381fc3eb
Require nix ~0.24.3 and chrono ~0.4.31 in Cargo.toml
...
These minor versions are required for the APIs used in pingora-core.
2024-03-22 15:00:42 -07:00
Yuchen Wu
f431624701
Correctly init body writer for upgraded requests
...
Before this change, the code tried to get the header from the stored
header which is only set after this function is called.
2024-03-22 15:00:42 -07:00
gengteng
558371c190
feat: Enhance Server::new to accept impl Into<Option<T>> for ergonomics
...
Replicated-from: https://github.com/cloudflare/pingora/pull/100
Includes-commit: 15cffed202
2024-03-22 14:26:16 -07:00
ewang
20fd391f3e
Add server_addr and client_addr to Session
2024-03-15 14:37:56 -07:00
Andrew Hauck
3e09114c4d
Treat OS read timeouts as ReadError rather than ReadTimeout when reading http/1.1 response headers
2024-03-15 14:37:56 -07:00
Matthew Gumport
ae8ea771b1
compile and test cleanly with nightly
...
The vast majority of these are redundant imports.
2024-03-15 14:37:56 -07:00
afon
81e6adea4d
Unify the type for matching verify_result
2024-03-15 14:37:56 -07:00
Andrew Hauck
d19ae74563
Revert "Fix verify_result() in ssl client for boringssl"
...
This reverts commit 9f410d52221da26c0651a99d071daf9b7acf87a2.
2024-03-15 14:37:56 -07:00
Andrew Hauck
a39694899f
Fix SslMethod reference in connectors tests for boringssl
2024-03-15 14:37:56 -07:00
Andrew Hauck
8e994c396e
Fix verify_result() in ssl client for boringssl
...
Co-authored-by: afon <wengxufeng@gmail.com>
2024-03-15 14:37:56 -07:00
Andrew Hauck
dec624b1c7
Ensure consistent usage of doc.rs links in rustdoc comments
...
Co-authored-by: zegevlier <iamascratcher@gmail.com>
2024-03-15 14:37:56 -07:00
ewang
8dc94d6cc4
More minor comment fixes and improvements
2024-03-01 13:47:27 -08:00
Yuchen Wu
8160ad1698
Fix typos and grammar issues
...
Co-authored-by: =?~~~?q?Ren=C3=A9=20Kla=C4=8Dan?= <rene@klacan.sk>
Co-authored-by: 12932 <68835423+12932@users.noreply.github.com>
Co-authored-by: Alessandro <aleferrara1998@gmail.com>
Co-authored-by: InImpasse <40639475+InImpasse@users.noreply.github.com>
Co-authored-by: Paul James Cleary <pauljamescleary@gmail.com>
Co-authored-by: Yang Hau <yuanyanghau@gmail.com>
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 <zkd8907@live.com>
Co-authored-by: Dup4 <lyuzhi.pan@gmail.com>
Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Sheldon <1415182877@qq.com>
Co-authored-by: houseme <housemecn@gmail.com>
Co-authored-by: ZhangIvan1 <zhang_ivan1@163.com>
Co-authored-by: GrahamQuan <33834833+GrahamQuan@users.noreply.github.com>
Co-authored-by: =?~~~?q?Cristian=20Paul=20Pe=C3=B1aranda=20Rojas?= <paul@kristianpaul.org>
Co-authored-by: Nathan Sit <nsit.earth@gmail.com>
Co-authored-by: David Lee <67067729+LordMoMA@users.noreply.github.com>
Co-authored-by: Mengliang Su <mengliang.su@shopee.com>
Co-authored-by: =?~~~?q?=EA=B9=80=EC=84=A0=EC=9A=B0?= <seonwoo960000@toss.im>
Co-authored-by: Allen Huang <huangseji@meituan.com>
Co-authored-by: Opacity <70315161+zreren@users.noreply.github.com>
Co-authored-by: cris <sqdcmk@gmail.com>
Co-authored-by: Killian Ye <40255385+ykw1129@users.noreply.github.com>
Co-authored-by: Jiwei-dev <hi.jiwei@gmail.com>
Co-authored-by: Jinfeng Wang <41931794+wjf40390@users.noreply.github.com>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
2024-03-01 13:47:27 -08:00
Yuchen Wu
8797329225
Release Pingora version 0.1.0
...
Co-authored-by: Andrew Hauck <ahauck@cloudflare.com>
Co-authored-by: Edward Wang <ewang@cloudflare.com>
2024-02-27 20:25:44 -08:00