Conversation
Update from hyper 0.14 to hyper 1.0 ecosystem, matching the eventsource-client dependency. This includes: - Upgrade http crate from 0.2 to 1.0 - Use hyper-util for legacy Client API - Use http-body-util for body types - Update hyper-rustls from 0.24 to 0.27 - Update all trait bounds and type annotations - Add tower as direct dependency for Service trait BREAKING CHANGE: hyper-related trait bounds have changed for custom connector implementations. The Future associated type now requires Unpin bound, and trait bounds have been updated to use tower::Service and hyper_util::client::legacy::connect types.
Introduce a generic HttpTransport trait to decouple the SDK from specific HTTP client implementations. This follows the pattern established in eventsource-client. - Add transport.rs with HttpTransport trait and error types - Add transport_hyper.rs with hyper 1.0 implementation - Make hyper an optional dependency via feature flags - Use Bytes for request bodies (supports binary and empty) - Stream response bodies via ByteStream type alias This commit adds the abstraction without changing existing code.
Convert feature requester and polling data source to use the generic HttpTransport trait instead of hyper Client directly. - Replace HyperFeatureRequester<C> with HttpFeatureRequester<T> - Replace HyperFeatureRequesterBuilder with HttpFeatureRequesterBuilder - Update PollingDataSourceBuilder to accept transport - Stream and collect response body for JSON parsing - Remove hyper-specific imports and trait bounds - Update test helpers to use HyperTransport BREAKING CHANGE: PollingDataSourceBuilder generic parameter changed from connector (C) to transport (T: HttpTransport).
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| .map_err(|e| format!("Failed to sign: {e}"))?; | ||
|
|
||
| Ok(data_encoding::HEXLOWER.encode(&hmac)) | ||
| } |
There was a problem hiding this comment.
Ambiguous crypto selection when both features enabled
Medium Severity
In secure_mode_hash, the #[cfg(feature = "crypto-aws-lc-rs")] and #[cfg(feature = "crypto-openssl")] blocks are sequential block expressions. When both features are enabled (e.g., a user adds crypto-openssl without disabling defaults which include crypto-aws-lc-rs), the aws-lc-rs block becomes a non-tail statement whose Result is silently discarded, and only the openssl block's result is returned. This wastes computation and produces compiler warnings about unused Result. Using #[cfg_attr] with cfg_attr(not(...)) or return could ensure mutual exclusion or explicit precedence.


BEGIN_COMMIT_OVERRIDE
feat!: Replace local hyper dependency with new launchdarkly-sdk-transport
feat!: Remove deprecated initialized_async function
feat!: Allow filtering all_flags_state to mobile only
feat: Support synchronous event sending with new flush_blocking method
feat!: Add native-tls feature
feat: Choose crypto library with crypto-(aws-lc-rs|openssl) features
feat!: Enable event compression by default
feat: Add support for test datasource
END_COMMIT_OVERRIDE
Note
Cursor Bugbot is generating a summary for commit d4b73ec. Configure here.