222 fix native https client#223
Merged
AlixANNERAUD merged 5 commits intomainfrom Apr 24, 2026
Merged
Conversation
- Added `http_common.rs` with functions for error mapping, host/port splitting, request length computation, and response header building. - Refactored `https_client.rs` to utilize the new HTTP common utilities, improving code organization and readability. - Updated the `HttpsClientContext` to manage state transitions more effectively and handle asynchronous operations. - Introduced state management for request handling to prevent concurrent requests. - Enhanced error handling and logging throughout the HTTPS client implementation.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for an HTTP client device, refines device selection logic for web requests, and improves network stack polling behavior. It also adds several utility functions for HTTP handling and cleans up logging in the HTTP module. The most important changes are grouped below:
HTTP Client Device Support
HttpClientDeviceto the shared drivers and registered it in both native and wasm example main files, enabling HTTP (non-TLS) client capabilities. (drivers/shared/src/devices/http_client.rs,drivers/shared/src/devices/mod.rs,examples/native/src/main.rs,examples/wasm/src/main.rs) [1] [2] [3]Web Request Device Selection
select_client_device_pathfunction to choose between HTTP and HTTPS client devices based on the URL scheme, updated the web request command to use this logic, and added tests to verify correct device selection. (executables/shell/command_line/src/commands/web_request.rs) [1] [2] [3] [4]HTTP Utilities and Error Handling
http_common.rsfor mapping network errors, splitting host and port, computing request length, and building serialized response headers. (drivers/shared/src/devices/http_common.rs)Network Stack Improvements
modules/network/src/manager/runner.rs) [1] [2]modules/network/src/socket/tcp.rs)Codebase Cleanup
modules/shared/src/http/mod.rs)Dependency Updates
Cargo.tomlto addembassy-futuresand fix the version forembedded-io-async. (drivers/shared/Cargo.toml)