You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor HTTP client response handling and TLS session caching
- Updated the response handling in `crates/hpx/src/client/http/future.rs` to use `Response::from_client_response` for better clarity and consistency.
- Enhanced the recovery layer in `crates/hpx/src/client/layer/recovery.rs` to improve error handling and response body processing.
- Modified the request construction in `crates/hpx/src/client/request.rs` to support streaming bodies without pre-buffering.
- Improved the response struct in `crates/hpx/src/client/response.rs` to allow for better body handling and deserialization.
- Refactored header sorting logic in `crates/hpx/src/header.rs` to preserve original casing and order while processing headers.
- Enhanced TLS session caching in `crates/hpx/src/tls/boring.rs` and `crates/hpx/src/tls/boring/cache.rs` to support better session management and eviction policies.
Requires the `stream` feature. For reverse proxies and API gateways, `hpx` can forward framework-native request bodies without buffering the full payload.
If you need to inspect or transform chunks instead of transparently forwarding them, use `Response::bytes_stream()` or `Response::into_body()`. For Tower-native composition, `Client::into_tower_service()` returns the `tower_compat::HpxService` alias.
310
+
272
311
### Browser Emulation
273
312
274
313
Requires the `hpx-emulation` crate with default features.
Requires the `stream` feature. `Request::from_http(...)` lets you forward framework-native request bodies into `hpx` without buffering them first, which is useful in reverse proxies and API gateways.
Use `Response::bytes_stream()` when you need per-chunk inspection, and `Client::into_tower_service()` when you want to compose the client inside a Tower middleware stack via `tower_compat::HpxService`.
83
+
45
84
## Cloudflare mTLS
46
85
47
86
`hpx` can attach a client certificate during the TLS handshake, which is required for Cloudflare Access / Zero Trust deployments protected by mutual TLS.
0 commit comments