From d346176ad5fc383adf3080c1645fa9d50e1e9696 Mon Sep 17 00:00:00 2001 From: Aaron Todd Date: Thu, 24 Oct 2024 19:33:11 +0000 Subject: [PATCH 01/11] migrate most tests to new test util location --- aws/rust-runtime/aws-config/Cargo.lock | 7 ++-- aws/rust-runtime/aws-config/Cargo.toml | 3 +- .../src/default_provider/credentials.rs | 2 +- aws/rust-runtime/aws-config/src/ecs.rs | 2 +- .../src/http_credential_provider.rs | 2 +- .../aws-config/src/imds/client.rs | 4 +-- .../aws-config/src/imds/credentials.rs | 2 +- .../aws-config/src/imds/region.rs | 2 +- aws/rust-runtime/aws-config/src/lib.rs | 2 +- aws/rust-runtime/aws-config/src/sso/token.rs | 5 ++- .../aws-config/src/sts/assume_role.rs | 4 +-- aws/rust-runtime/aws-config/src/test_case.rs | 4 +-- .../integration-tests/codecatalyst/Cargo.toml | 3 +- .../codecatalyst/tests/sso_bearer_auth.rs | 2 +- aws/sdk/integration-tests/dynamodb/Cargo.toml | 5 +-- .../dynamodb/tests/auth_scheme_error.rs | 2 +- .../dynamodb/tests/endpoints.rs | 2 +- .../dynamodb/tests/movies.rs | 2 +- .../dynamodb/tests/paginators.rs | 4 +-- .../retries-with-client-rate-limiting.rs | 2 +- .../dynamodb/tests/shared-config.rs | 2 +- .../tests/test-error-classification.rs | 3 +- .../dynamodb/tests/timeouts.rs | 2 +- aws/sdk/integration-tests/ec2/Cargo.toml | 5 +-- .../integration-tests/ec2/tests/paginators.rs | 2 +- .../integration-tests/ec2/tests/waiters.rs | 5 ++- aws/sdk/integration-tests/glacier/Cargo.toml | 5 +-- .../glacier/tests/custom-headers.rs | 2 +- aws/sdk/integration-tests/iam/Cargo.toml | 5 +-- .../iam/tests/resolve-global-endpoint.rs | 2 +- aws/sdk/integration-tests/kms/Cargo.toml | 5 +-- .../kms/tests/integration.rs | 2 +- .../kms/tests/retryable_errors.rs | 2 +- aws/sdk/integration-tests/lambda/Cargo.toml | 5 +-- .../lambda/tests/request_id.rs | 2 +- .../no-default-features/Cargo.toml | 3 +- .../tests/client-construction.rs | 2 +- aws/sdk/integration-tests/polly/Cargo.toml | 2 +- .../integration-tests/qldbsession/Cargo.toml | 5 +-- .../qldbsession/tests/integration.rs | 2 +- aws/sdk/integration-tests/s3/Cargo.toml | 10 +++--- .../s3/tests/alternative-async-runtime.rs | 2 +- .../s3/tests/body_size_hint.rs | 2 +- .../s3/tests/bucket-required.rs | 2 +- .../integration-tests/s3/tests/checksums.rs | 11 +++--- .../s3/tests/config-override.rs | 2 +- .../s3/tests/content-length-enforcement.rs | 2 +- .../s3/tests/customizable-operation.rs | 2 +- .../integration-tests/s3/tests/endpoints.rs | 2 +- .../s3/tests/expires_interceptor.rs | 2 +- aws/sdk/integration-tests/s3/tests/express.rs | 6 ++-- .../s3/tests/identity-cache.rs | 2 +- .../s3/tests/ignore-invalid-xml-body-root.rs | 2 +- .../s3/tests/interceptors.rs | 2 +- .../s3/tests/naughty-string-metadata.rs | 2 +- aws/sdk/integration-tests/s3/tests/no_auth.rs | 2 +- .../s3/tests/normalize-uri-path.rs | 2 +- .../query-strings-are-correctly-encoded.rs | 2 +- .../integration-tests/s3/tests/reconnects.rs | 3 +- .../s3/tests/recursion-detection.rs | 2 +- .../integration-tests/s3/tests/request_id.rs | 2 +- .../s3/tests/request_information_headers.rs | 2 +- .../s3/tests/required-query-params.rs | 2 +- .../tests/retry-classifier-customization.rs | 2 +- .../s3/tests/select-object-content.rs | 2 +- .../s3/tests/service_timeout_overrides.rs | 2 +- .../integration-tests/s3/tests/signing-it.rs | 2 +- .../s3/tests/stalled-stream-protection.rs | 17 +++------ .../s3/tests/status-200-errors.rs | 2 +- .../s3/tests/streaming-response.rs | 2 +- .../integration-tests/s3/tests/timeouts.rs | 2 +- .../integration-tests/s3control/Cargo.toml | 5 +-- .../s3control/tests/signing-it.rs | 2 +- aws/sdk/integration-tests/sts/Cargo.toml | 3 +- .../integration-tests/sts/tests/signing-it.rs | 2 +- .../timestreamquery/Cargo.toml | 1 + .../timestreamquery/tests/endpoint_disco.rs | 2 +- .../transcribestreaming/Cargo.toml | 4 +-- .../transcribestreaming/tests/test.rs | 2 +- .../src/test_util/capture_request.rs | 12 +++++-- .../src/test_util/dvr/record.rs | 2 +- .../src/http/headers.rs | 36 +++++++++++++++++++ 82 files changed, 164 insertions(+), 130 deletions(-) diff --git a/aws/rust-runtime/aws-config/Cargo.lock b/aws/rust-runtime/aws-config/Cargo.lock index d026d3a069..9b32a7ba37 100644 --- a/aws/rust-runtime/aws-config/Cargo.lock +++ b/aws/rust-runtime/aws-config/Cargo.lock @@ -60,6 +60,7 @@ dependencies = [ "aws-sdk-sts", "aws-smithy-async", "aws-smithy-http", + "aws-smithy-http-client", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -69,7 +70,7 @@ dependencies = [ "fastrand", "futures-util", "hex", - "http 0.2.12", + "http 1.1.0", "hyper-rustls", "ring", "serde", @@ -179,7 +180,7 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.4" +version = "1.2.5" dependencies = [ "aws-credential-types", "aws-smithy-http", @@ -323,7 +324,7 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.7" +version = "1.2.8" dependencies = [ "base64-simd", "bytes", diff --git a/aws/rust-runtime/aws-config/Cargo.toml b/aws/rust-runtime/aws-config/Cargo.toml index d8ed49845a..73120d9024 100644 --- a/aws/rust-runtime/aws-config/Cargo.toml +++ b/aws/rust-runtime/aws-config/Cargo.toml @@ -35,7 +35,7 @@ aws-smithy-runtime-api = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-runtim aws-smithy-types = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-types" } aws-types = { path = "../../sdk/build/aws-sdk/sdk/aws-types" } bytes = "1.1.0" -http = "0.2.4" +http = "1" time = { version = "0.3.4", features = ["parsing"] } tokio = { version = "1.13.1", features = ["sync"] } tracing = { version = "0.1" } @@ -55,6 +55,7 @@ aws-sdk-ssooidc = { path = "../../sdk/build/aws-sdk/sdk/ssooidc", default-featur [dev-dependencies] aws-smithy-runtime = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "connector-hyper-0-14-x", "test-util"] } +aws-smithy-http-client = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-smithy-runtime-api = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["test-util"] } futures-util = { version = "0.3.29", default-features = false } tracing-test = "0.2.4" diff --git a/aws/rust-runtime/aws-config/src/default_provider/credentials.rs b/aws/rust-runtime/aws-config/src/default_provider/credentials.rs index 809a23dfe5..13b1a4438a 100644 --- a/aws/rust-runtime/aws-config/src/default_provider/credentials.rs +++ b/aws/rust-runtime/aws-config/src/default_provider/credentials.rs @@ -352,8 +352,8 @@ mod test { use crate::provider_config::ProviderConfig; use aws_credential_types::provider::error::CredentialsError; use aws_smithy_async::rt::sleep::TokioSleep; + use aws_smithy_http_client::test_util::NeverTcpConnector; use aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder; - use aws_smithy_runtime::client::http::test_util::NeverTcpConnector; tokio::time::pause(); let conf = ProviderConfig::no_configuration() diff --git a/aws/rust-runtime/aws-config/src/ecs.rs b/aws/rust-runtime/aws-config/src/ecs.rs index fc7e8ad290..3f89e4d5cc 100644 --- a/aws/rust-runtime/aws-config/src/ecs.rs +++ b/aws/rust-runtime/aws-config/src/ecs.rs @@ -498,7 +498,7 @@ mod test { use aws_credential_types::Credentials; use aws_smithy_async::future::never::Never; use aws_smithy_async::rt::sleep::TokioSleep; - use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; + use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_runtime_api::client::dns::DnsFuture; use aws_smithy_runtime_api::client::http::HttpClient; use aws_smithy_runtime_api::shared::IntoShared; diff --git a/aws/rust-runtime/aws-config/src/http_credential_provider.rs b/aws/rust-runtime/aws-config/src/http_credential_provider.rs index 41911e16f0..240b439f41 100644 --- a/aws/rust-runtime/aws-config/src/http_credential_provider.rs +++ b/aws/rust-runtime/aws-config/src/http_credential_provider.rs @@ -220,7 +220,7 @@ impl ClassifyRetry for HttpCredentialRetryClassifier { mod test { use super::*; use aws_credential_types::provider::error::CredentialsError; - use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; + use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; use http::{Request, Response, Uri}; use std::time::SystemTime; diff --git a/aws/rust-runtime/aws-config/src/imds/client.rs b/aws/rust-runtime/aws-config/src/imds/client.rs index 7bdc14f2a7..d93cc124a0 100644 --- a/aws/rust-runtime/aws-config/src/imds/client.rs +++ b/aws/rust-runtime/aws-config/src/imds/client.rs @@ -582,9 +582,7 @@ pub(crate) mod test { use crate::provider_config::ProviderConfig; use aws_smithy_async::rt::sleep::TokioSleep; use aws_smithy_async::test_util::{instant_time_and_sleep, InstantSleep}; - use aws_smithy_runtime::client::http::test_util::{ - capture_request, ReplayEvent, StaticReplayClient, - }; + use aws_smithy_http_client::test_util::{capture_request, ReplayEvent, StaticReplayClient}; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; use aws_smithy_runtime_api::client::interceptors::context::{ Input, InterceptorContext, Output, diff --git a/aws/rust-runtime/aws-config/src/imds/credentials.rs b/aws/rust-runtime/aws-config/src/imds/credentials.rs index 888237d1a3..21084251c4 100644 --- a/aws/rust-runtime/aws-config/src/imds/credentials.rs +++ b/aws/rust-runtime/aws-config/src/imds/credentials.rs @@ -289,7 +289,7 @@ mod test { use crate::provider_config::ProviderConfig; use aws_credential_types::provider::ProvideCredentials; use aws_smithy_async::test_util::instant_time_and_sleep; - use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; + use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; use std::time::{Duration, UNIX_EPOCH}; use tracing_test::traced_test; diff --git a/aws/rust-runtime/aws-config/src/imds/region.rs b/aws/rust-runtime/aws-config/src/imds/region.rs index c837438a62..d8da43ed25 100644 --- a/aws/rust-runtime/aws-config/src/imds/region.rs +++ b/aws/rust-runtime/aws-config/src/imds/region.rs @@ -120,7 +120,7 @@ mod test { use crate::imds::region::ImdsRegionProvider; use crate::provider_config::ProviderConfig; use aws_smithy_async::rt::sleep::TokioSleep; - use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; + use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; use aws_types::region::Region; use tracing_test::traced_test; diff --git a/aws/rust-runtime/aws-config/src/lib.rs b/aws/rust-runtime/aws-config/src/lib.rs index 49bfad8d6a..d09d82c3bd 100644 --- a/aws/rust-runtime/aws-config/src/lib.rs +++ b/aws/rust-runtime/aws-config/src/lib.rs @@ -943,7 +943,7 @@ mod loader { use crate::{defaults, ConfigLoader}; use aws_credential_types::provider::ProvideCredentials; use aws_smithy_async::rt::sleep::TokioSleep; - use aws_smithy_runtime::client::http::test_util::{infallible_client_fn, NeverClient}; + use aws_smithy_http_client::test_util::{infallible_client_fn, NeverClient}; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; use aws_types::app_name::AppName; use aws_types::origin::Origin; diff --git a/aws/rust-runtime/aws-config/src/sso/token.rs b/aws/rust-runtime/aws-config/src/sso/token.rs index 0cf6f0572e..51cc2bd12f 100644 --- a/aws/rust-runtime/aws-config/src/sso/token.rs +++ b/aws/rust-runtime/aws-config/src/sso/token.rs @@ -406,10 +406,9 @@ mod tests { use aws_smithy_async::rt::sleep::TokioSleep; use aws_smithy_async::test_util::instant_time_and_sleep; use aws_smithy_async::time::{StaticTimeSource, TimeSource}; - use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; + use aws_smithy_http_client::test_util::{capture_request, ReplayEvent, StaticReplayClient}; use aws_smithy_runtime::{ - assert_str_contains, - client::http::test_util::{capture_request, ReplayEvent, StaticReplayClient}, + assert_str_contains, test_util::capture_test_logs::capture_test_logs, }; use aws_smithy_runtime_api::client::http::HttpClient; use aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder; diff --git a/aws/rust-runtime/aws-config/src/sts/assume_role.rs b/aws/rust-runtime/aws-config/src/sts/assume_role.rs index 9605cb0e07..29cf164339 100644 --- a/aws/rust-runtime/aws-config/src/sts/assume_role.rs +++ b/aws/rust-runtime/aws-config/src/sts/assume_role.rs @@ -335,9 +335,7 @@ mod test { use aws_smithy_async::rt::sleep::{SharedAsyncSleep, TokioSleep}; use aws_smithy_async::test_util::instant_time_and_sleep; use aws_smithy_async::time::StaticTimeSource; - use aws_smithy_runtime::client::http::test_util::{ - capture_request, ReplayEvent, StaticReplayClient, - }; + use aws_smithy_http_client::test_util::{capture_request, ReplayEvent, StaticReplayClient}; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; use aws_smithy_runtime_api::client::behavior_version::BehaviorVersion; use aws_smithy_types::body::SdkBody; diff --git a/aws/rust-runtime/aws-config/src/test_case.rs b/aws/rust-runtime/aws-config/src/test_case.rs index 4076094e69..a5f5807d40 100644 --- a/aws/rust-runtime/aws-config/src/test_case.rs +++ b/aws/rust-runtime/aws-config/src/test_case.rs @@ -7,9 +7,7 @@ use crate::default_provider::use_dual_stack::use_dual_stack_provider; use crate::default_provider::use_fips::use_fips_provider; use crate::provider_config::ProviderConfig; use aws_smithy_async::rt::sleep::{AsyncSleep, Sleep, TokioSleep}; -use aws_smithy_runtime::client::http::test_util::dvr::{ - NetworkTraffic, RecordingClient, ReplayingClient, -}; +use aws_smithy_http_client::test_util::dvr::{NetworkTraffic, RecordingClient, ReplayingClient}; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; use aws_smithy_runtime_api::box_error::BoxError; use aws_smithy_runtime_api::shared::IntoShared; diff --git a/aws/sdk/integration-tests/codecatalyst/Cargo.toml b/aws/sdk/integration-tests/codecatalyst/Cargo.toml index d4fb2c8088..1e5a7458c4 100644 --- a/aws/sdk/integration-tests/codecatalyst/Cargo.toml +++ b/aws/sdk/integration-tests/codecatalyst/Cargo.toml @@ -12,6 +12,7 @@ publish = false [dependencies] aws-sdk-codecatalyst = { path = "../../build/aws-sdk/sdk/codecatalyst", features = ["behavior-version-latest", "test-util"] } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "wire-mock", "test-util"] } +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["wire-mock", "test-util"] } tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/codecatalyst/tests/sso_bearer_auth.rs b/aws/sdk/integration-tests/codecatalyst/tests/sso_bearer_auth.rs index b11861b555..8118fe5cfc 100644 --- a/aws/sdk/integration-tests/codecatalyst/tests/sso_bearer_auth.rs +++ b/aws/sdk/integration-tests/codecatalyst/tests/sso_bearer_auth.rs @@ -7,7 +7,7 @@ use aws_sdk_codecatalyst::config::Token; #[tokio::test] async fn sso_bearer_auth() { - let replay = aws_smithy_runtime::client::http::test_util::dvr::ReplayingClient::from_file( + let replay = aws_smithy_http_client::test_util::dvr::ReplayingClient::from_file( "tests/sso_bearer_auth.json", ) .unwrap(); diff --git a/aws/sdk/integration-tests/dynamodb/Cargo.toml b/aws/sdk/integration-tests/dynamodb/Cargo.toml index 135d5f8a43..169caeecf0 100644 --- a/aws/sdk/integration-tests/dynamodb/Cargo.toml +++ b/aws/sdk/integration-tests/dynamodb/Cargo.toml @@ -19,13 +19,14 @@ aws-sdk-dynamodb = { path = "../../build/aws-sdk/sdk/dynamodb", features = ["beh aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async", features = ["test-util"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } aws-smithy-protocol-test = { path = "../../build/aws-sdk/sdk/aws-smithy-protocol-test" } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["test-util", "wire-mock"]} +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util", "wire-mock"] } aws-smithy-runtime-api = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["test-util"]} aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types", features = ["test-util"]} aws-types = { path = "../../build/aws-sdk/sdk/aws-types" } bytes = "1.0.0" futures-util = { version = "0.3.29", default-features = false } -http = "0.2.0" +http = "1" serde_json = "1.0.0" tokio = { version = "1.23.1", features = ["full", "test-util"] } tokio-stream = "0.1.5" diff --git a/aws/sdk/integration-tests/dynamodb/tests/auth_scheme_error.rs b/aws/sdk/integration-tests/dynamodb/tests/auth_scheme_error.rs index 702a3fd933..85e0165509 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/auth_scheme_error.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/auth_scheme_error.rs @@ -6,8 +6,8 @@ use aws_sdk_dynamodb::config::Region; use aws_sdk_dynamodb::error::DisplayErrorContext; use aws_sdk_dynamodb::{Client, Config}; +use aws_smithy_http_client::test_util::capture_request; use aws_smithy_runtime::assert_str_contains; -use aws_smithy_runtime::client::http::test_util::capture_request; #[tokio::test] async fn auth_scheme_error() { diff --git a/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs b/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs index e430d60d43..a172772a7f 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs @@ -4,7 +4,7 @@ */ use aws_sdk_dynamodb::config::{self, Credentials, Region}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; use aws_types::SdkConfig; use http::Uri; diff --git a/aws/sdk/integration-tests/dynamodb/tests/movies.rs b/aws/sdk/integration-tests/dynamodb/tests/movies.rs index 6254dd6ece..3a30570b56 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/movies.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/movies.rs @@ -5,7 +5,7 @@ use aws_sdk_dynamodb as dynamodb; use aws_smithy_async::assert_elapsed; -use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; +use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; use dynamodb::config::{Credentials, Region}; use dynamodb::operation::query::QueryOutput; diff --git a/aws/sdk/integration-tests/dynamodb/tests/paginators.rs b/aws/sdk/integration-tests/dynamodb/tests/paginators.rs index 7cb07f0767..cffbcf9286 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/paginators.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/paginators.rs @@ -9,10 +9,8 @@ use std::iter::FromIterator; use aws_credential_types::Credentials; use aws_sdk_dynamodb::types::AttributeValue; use aws_sdk_dynamodb::{Client, Config}; +use aws_smithy_http_client::test_util::{capture_request, ReplayEvent, StaticReplayClient}; use aws_smithy_protocol_test::{assert_ok, validate_body, MediaType}; -use aws_smithy_runtime::client::http::test_util::{ - capture_request, ReplayEvent, StaticReplayClient, -}; use aws_smithy_runtime_api::client::http::HttpClient; use aws_smithy_types::body::SdkBody; use aws_types::region::Region; diff --git a/aws/sdk/integration-tests/dynamodb/tests/retries-with-client-rate-limiting.rs b/aws/sdk/integration-tests/dynamodb/tests/retries-with-client-rate-limiting.rs index b1a9733465..35e0ac8da1 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/retries-with-client-rate-limiting.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/retries-with-client-rate-limiting.rs @@ -9,7 +9,7 @@ use aws_sdk_dynamodb::config::{ use aws_sdk_dynamodb::{config::retry::RetryConfig, error::ProvideErrorMetadata}; use aws_smithy_async::test_util::instant_time_and_sleep; use aws_smithy_async::time::SharedTimeSource; -use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; +use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_runtime::client::retries::RetryPartition; use aws_smithy_types::body::SdkBody; use std::time::{Duration, SystemTime}; diff --git a/aws/sdk/integration-tests/dynamodb/tests/shared-config.rs b/aws/sdk/integration-tests/dynamodb/tests/shared-config.rs index 02786fe0af..6e6d9b3809 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/shared-config.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/shared-config.rs @@ -4,7 +4,7 @@ */ use aws_sdk_dynamodb::config::{Credentials, Region, StalledStreamProtectionConfig}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; use http::Uri; /// Iterative test of loading clients from shared configuration diff --git a/aws/sdk/integration-tests/dynamodb/tests/test-error-classification.rs b/aws/sdk/integration-tests/dynamodb/tests/test-error-classification.rs index 244f20c871..eaac94045f 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/test-error-classification.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/test-error-classification.rs @@ -9,8 +9,7 @@ use aws_credential_types::Credentials; use aws_sdk_dynamodb::types::AttributeValue; use aws_sdk_dynamodb::Client; use aws_smithy_async::rt::sleep::{SharedAsyncSleep, TokioSleep}; -use aws_smithy_runtime::client::http::test_util::wire::{ReplayedEvent, WireMockServer}; -use aws_smithy_runtime::{ev, match_events}; +use aws_smithy_http_client::test_util::wire::{ev, match_events, ReplayedEvent, WireMockServer}; use aws_smithy_types::retry::RetryConfig; use aws_smithy_types::timeout::TimeoutConfig; use aws_types::region::Region; diff --git a/aws/sdk/integration-tests/dynamodb/tests/timeouts.rs b/aws/sdk/integration-tests/dynamodb/tests/timeouts.rs index d7a41750dc..783d7996bd 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/timeouts.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/timeouts.rs @@ -9,7 +9,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_dynamodb::config::{Credentials, Region, StalledStreamProtectionConfig}; use aws_sdk_dynamodb::error::SdkError; use aws_smithy_async::rt::sleep::{AsyncSleep, SharedAsyncSleep, Sleep}; -use aws_smithy_runtime::client::http::test_util::NeverClient; +use aws_smithy_http_client::test_util::NeverClient; use aws_smithy_types::retry::RetryConfig; use aws_smithy_types::timeout::TimeoutConfig; use aws_types::SdkConfig; diff --git a/aws/sdk/integration-tests/ec2/Cargo.toml b/aws/sdk/integration-tests/ec2/Cargo.toml index 402507a1a9..15bd72ded4 100644 --- a/aws/sdk/integration-tests/ec2/Cargo.toml +++ b/aws/sdk/integration-tests/ec2/Cargo.toml @@ -11,9 +11,10 @@ aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", aws-runtime = { path = "../../build/aws-sdk/sdk/aws-runtime", features = ["test-util"] } aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async", features = ["test-util"] } aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } -aws-smithy-runtime-api = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["client", "http-02x"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } +aws-smithy-runtime-api = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["client", "http-1x"] } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } aws-sdk-ec2 = { path = "../../build/aws-sdk/sdk/ec2", features = ["behavior-version-latest", "test-util"] } tokio = { version = "1.23.1", features = ["full"]} -http = "0.2.0" +http = "1" tokio-stream = "0.1.5" diff --git a/aws/sdk/integration-tests/ec2/tests/paginators.rs b/aws/sdk/integration-tests/ec2/tests/paginators.rs index bad9bbf793..339752b1cd 100644 --- a/aws/sdk/integration-tests/ec2/tests/paginators.rs +++ b/aws/sdk/integration-tests/ec2/tests/paginators.rs @@ -5,7 +5,7 @@ use aws_runtime::user_agent::test_util::assert_ua_contains_metric_values; use aws_sdk_ec2::{config::Credentials, config::Region, types::InstanceType, Client, Config}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; use aws_smithy_runtime_api::client::http::HttpClient; use aws_smithy_types::body::SdkBody; use std::collections::HashSet; diff --git a/aws/sdk/integration-tests/ec2/tests/waiters.rs b/aws/sdk/integration-tests/ec2/tests/waiters.rs index 8efbbb5ede..c9f5c5d346 100644 --- a/aws/sdk/integration-tests/ec2/tests/waiters.rs +++ b/aws/sdk/integration-tests/ec2/tests/waiters.rs @@ -8,9 +8,8 @@ use aws_sdk_ec2::{client::Waiters, config::Region, error::DisplayErrorContext, C use aws_smithy_async::test_util::tick_advance_sleep::{ tick_advance_time_and_sleep, TickAdvanceTime, }; -use aws_smithy_runtime::{ - client::http::test_util::dvr::ReplayingClient, test_util::capture_test_logs::show_test_logs, -}; +use aws_smithy_http_client::test_util::dvr::ReplayingClient; +use aws_smithy_runtime::test_util::capture_test_logs::show_test_logs; use aws_smithy_runtime_api::client::waiters::error::WaiterError; use aws_smithy_types::retry::RetryConfig; use std::time::Duration; diff --git a/aws/sdk/integration-tests/glacier/Cargo.toml b/aws/sdk/integration-tests/glacier/Cargo.toml index 6674d35d47..ecca077924 100644 --- a/aws/sdk/integration-tests/glacier/Cargo.toml +++ b/aws/sdk/integration-tests/glacier/Cargo.toml @@ -14,8 +14,9 @@ publish = false aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] } aws-sdk-glacier = { path = "../../build/aws-sdk/sdk/glacier", features = ["behavior-version-latest"] } aws-smithy-protocol-test = { path = "../../build/aws-sdk/sdk/aws-smithy-protocol-test"} -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } bytes = "1.0.0" -http = "0.2.0" +http = "1" tokio = { version = "1.23.1", features = ["full", "test-util"]} tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/glacier/tests/custom-headers.rs b/aws/sdk/integration-tests/glacier/tests/custom-headers.rs index 52194567cc..7946a291ce 100644 --- a/aws/sdk/integration-tests/glacier/tests/custom-headers.rs +++ b/aws/sdk/integration-tests/glacier/tests/custom-headers.rs @@ -5,8 +5,8 @@ use aws_sdk_glacier::config::{Credentials, Region}; use aws_sdk_glacier::primitives::ByteStream; +use aws_smithy_http_client::test_util::capture_request; use aws_smithy_protocol_test::{assert_ok, validate_headers}; -use aws_smithy_runtime::client::http::test_util::capture_request; #[tokio::test] async fn set_correct_headers() { diff --git a/aws/sdk/integration-tests/iam/Cargo.toml b/aws/sdk/integration-tests/iam/Cargo.toml index 0c1a02e8b8..139891e63f 100644 --- a/aws/sdk/integration-tests/iam/Cargo.toml +++ b/aws/sdk/integration-tests/iam/Cargo.toml @@ -13,9 +13,10 @@ publish = false [dev-dependencies] aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] } aws-sdk-iam = { path = "../../build/aws-sdk/sdk/iam", features = ["behavior-version-latest"] } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } bytes = "1.0.0" -http = "0.2.0" +http = "1" tokio = { version = "1.23.1", features = ["full", "test-util"]} tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/iam/tests/resolve-global-endpoint.rs b/aws/sdk/integration-tests/iam/tests/resolve-global-endpoint.rs index 70932827b8..153797ee3c 100644 --- a/aws/sdk/integration-tests/iam/tests/resolve-global-endpoint.rs +++ b/aws/sdk/integration-tests/iam/tests/resolve-global-endpoint.rs @@ -4,7 +4,7 @@ */ use aws_sdk_iam::config::{Credentials, Region}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; #[tokio::test] async fn correct_endpoint_resolver() { diff --git a/aws/sdk/integration-tests/kms/Cargo.toml b/aws/sdk/integration-tests/kms/Cargo.toml index 86e314597d..e65eff2c3b 100644 --- a/aws/sdk/integration-tests/kms/Cargo.toml +++ b/aws/sdk/integration-tests/kms/Cargo.toml @@ -21,9 +21,10 @@ aws-sdk-kms = { path = "../../build/aws-sdk/sdk/kms", features = ["test-util", " aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async", features = ["test-util"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-smithy-runtime-api = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["test-util"] } bytes = "1.0.0" -http = "0.2.0" +http = "1" tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/kms/tests/integration.rs b/aws/sdk/integration-tests/kms/tests/integration.rs index 7f832bc9e9..b0747053d5 100644 --- a/aws/sdk/integration-tests/kms/tests/integration.rs +++ b/aws/sdk/integration-tests/kms/tests/integration.rs @@ -5,7 +5,7 @@ use aws_sdk_kms as kms; use aws_sdk_kms::operation::RequestId; -use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; +use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_runtime_api::client::result::SdkError; use aws_smithy_types::body::SdkBody; use http::Uri; diff --git a/aws/sdk/integration-tests/kms/tests/retryable_errors.rs b/aws/sdk/integration-tests/kms/tests/retryable_errors.rs index dc1a633a84..f243bc5325 100644 --- a/aws/sdk/integration-tests/kms/tests/retryable_errors.rs +++ b/aws/sdk/integration-tests/kms/tests/retryable_errors.rs @@ -6,7 +6,7 @@ use aws_credential_types::Credentials; use aws_runtime::retries::classifiers::AwsErrorCodeClassifier; use aws_sdk_kms as kms; -use aws_smithy_runtime::client::http::test_util::infallible_client_fn; +use aws_smithy_http_client::test_util::infallible_client_fn; use aws_smithy_runtime_api::client::interceptors::context::{Error, Input, InterceptorContext}; use aws_smithy_runtime_api::client::orchestrator::{HttpResponse, OrchestratorError}; use aws_smithy_runtime_api::client::result::SdkError; diff --git a/aws/sdk/integration-tests/lambda/Cargo.toml b/aws/sdk/integration-tests/lambda/Cargo.toml index 45ff53adff..e35e080cee 100644 --- a/aws/sdk/integration-tests/lambda/Cargo.toml +++ b/aws/sdk/integration-tests/lambda/Cargo.toml @@ -13,11 +13,12 @@ aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", aws-sdk-lambda = { path = "../../build/aws-sdk/sdk/lambda", features = ["behavior-version-latest"] } aws-smithy-eventstream = { path = "../../build/aws-sdk/sdk/aws-smithy-eventstream" } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } base64 = "0.13.0" bytes = "1.0.0" futures-core = "0.3.29" -http = "0.2.0" +http = "1" serde_json = "1.0.0" tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/lambda/tests/request_id.rs b/aws/sdk/integration-tests/lambda/tests/request_id.rs index 4517f05bc9..db889048d6 100644 --- a/aws/sdk/integration-tests/lambda/tests/request_id.rs +++ b/aws/sdk/integration-tests/lambda/tests/request_id.rs @@ -7,7 +7,7 @@ use aws_sdk_lambda::config::{Credentials, Region}; use aws_sdk_lambda::operation::list_functions::ListFunctionsError; use aws_sdk_lambda::operation::RequestId; use aws_sdk_lambda::{Client, Config}; -use aws_smithy_runtime::client::http::test_util::infallible_client_fn; +use aws_smithy_http_client::test_util::infallible_client_fn; #[allow(deprecated)] async fn run_test( diff --git a/aws/sdk/integration-tests/no-default-features/Cargo.toml b/aws/sdk/integration-tests/no-default-features/Cargo.toml index 5c3d43ba16..04b0fe790d 100644 --- a/aws/sdk/integration-tests/no-default-features/Cargo.toml +++ b/aws/sdk/integration-tests/no-default-features/Cargo.toml @@ -18,8 +18,9 @@ aws-config = { path = "../../build/aws-sdk/sdk/aws-config", default-features = f aws-sdk-s3 = { path = "../../build/aws-sdk/sdk/s3", default-features = false } aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async" } aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["test-util"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] } futures = "0.3.25" tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } -http = "0.2.9" +http = "1" diff --git a/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs b/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs index d13a3c4853..1c0ef17d63 100644 --- a/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs +++ b/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs @@ -10,7 +10,7 @@ use aws_sdk_s3::config::{ SharedAsyncSleep, Sleep, StalledStreamProtectionConfig, }; use aws_sdk_s3::primitives::SdkBody; -use aws_smithy_runtime::client::http::test_util::infallible_client_fn; +use aws_smithy_http_client::test_util::infallible_client_fn; use aws_sdk_s3::error::DisplayErrorContext; use aws_smithy_async::rt::sleep::AsyncSleep; diff --git a/aws/sdk/integration-tests/polly/Cargo.toml b/aws/sdk/integration-tests/polly/Cargo.toml index c68b4e69ce..c79bc1302e 100644 --- a/aws/sdk/integration-tests/polly/Cargo.toml +++ b/aws/sdk/integration-tests/polly/Cargo.toml @@ -15,6 +15,6 @@ aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", aws-sdk-polly = { path = "../../build/aws-sdk/sdk/polly", features = ["behavior-version-latest"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } bytes = "1.0.0" -http = "0.2.0" +http = "1" tokio = { version = "1.23.1", features = ["full"]} tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/qldbsession/Cargo.toml b/aws/sdk/integration-tests/qldbsession/Cargo.toml index d235881dd4..b5f0ddf4e6 100644 --- a/aws/sdk/integration-tests/qldbsession/Cargo.toml +++ b/aws/sdk/integration-tests/qldbsession/Cargo.toml @@ -19,8 +19,9 @@ aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", aws-sdk-qldbsession = { path = "../../build/aws-sdk/sdk/qldbsession", features = ["test-util", "behavior-version-latest"] } aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async" } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } -http = "0.2.0" +http = "1" tokio = { version = "1.23.1", features = ["full"]} tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/qldbsession/tests/integration.rs b/aws/sdk/integration-tests/qldbsession/tests/integration.rs index b0df9190ae..30460bcc94 100644 --- a/aws/sdk/integration-tests/qldbsession/tests/integration.rs +++ b/aws/sdk/integration-tests/qldbsession/tests/integration.rs @@ -8,7 +8,7 @@ use aws_sdk_qldbsession::config::{Config, Credentials, Region}; use aws_sdk_qldbsession::types::StartSessionRequest; use aws_sdk_qldbsession::Client; -use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; +use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; use http::Uri; diff --git a/aws/sdk/integration-tests/s3/Cargo.toml b/aws/sdk/integration-tests/s3/Cargo.toml index dcf778ee8c..46e52513c9 100644 --- a/aws/sdk/integration-tests/s3/Cargo.toml +++ b/aws/sdk/integration-tests/s3/Cargo.toml @@ -23,18 +23,18 @@ aws-sdk-s3 = { path = "../../build/aws-sdk/sdk/s3", features = ["test-util", "be aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async", features = ["test-util", "rt-tokio"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } aws-smithy-protocol-test = { path = "../../build/aws-sdk/sdk/aws-smithy-protocol-test" } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["test-util", "wire-mock", "tls-rustls"] } -aws-smithy-runtime-api = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["test-util"] } +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["test-util"] } +aws-smithy-runtime-api = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["test-util", "http-1x"] } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } -aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["hyper-1", "crypto-ring"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["hyper-1", "crypto-ring", "test-util", "wire-mock"] } aws-types = { path = "../../build/aws-sdk/sdk/aws-types" } bytes = "1" bytes-utils = "0.1.2" fastrand = "2.0.1" futures-util = { version = "0.3.29", default-features = false, features = ["alloc"] } hdrhistogram = "7.5.2" -http = "0.2.3" -http-body = "0.4.5" +http = "1" +http-body = "1" hyper = { version = "0.14.26", features = ["stream"] } once_cell = "1.18.0" pretty_assertions = "1.3" diff --git a/aws/sdk/integration-tests/s3/tests/alternative-async-runtime.rs b/aws/sdk/integration-tests/s3/tests/alternative-async-runtime.rs index 2c8c4f4b0a..50a9a00188 100644 --- a/aws/sdk/integration-tests/s3/tests/alternative-async-runtime.rs +++ b/aws/sdk/integration-tests/s3/tests/alternative-async-runtime.rs @@ -13,7 +13,7 @@ use aws_sdk_s3::types::{ use aws_sdk_s3::{Client, Config}; use aws_smithy_async::assert_elapsed; use aws_smithy_async::rt::sleep::{AsyncSleep, SharedAsyncSleep, Sleep}; -use aws_smithy_runtime::client::http::test_util::NeverClient; +use aws_smithy_http_client::test_util::NeverClient; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; use aws_smithy_runtime_api::client::result::SdkError; use aws_smithy_types::error::display::DisplayErrorContext; diff --git a/aws/sdk/integration-tests/s3/tests/body_size_hint.rs b/aws/sdk/integration-tests/s3/tests/body_size_hint.rs index 97e9ac7234..c350e2c86e 100644 --- a/aws/sdk/integration-tests/s3/tests/body_size_hint.rs +++ b/aws/sdk/integration-tests/s3/tests/body_size_hint.rs @@ -11,7 +11,7 @@ use aws_sdk_s3::{ primitives::{ByteStream, SdkBody}, Client, }; -use aws_smithy_runtime::client::http::test_util::{capture_request, infallible_client_fn}; +use aws_smithy_http_client::test_util::{capture_request, infallible_client_fn}; use http_body::Body; #[tokio::test] diff --git a/aws/sdk/integration-tests/s3/tests/bucket-required.rs b/aws/sdk/integration-tests/s3/tests/bucket-required.rs index 3795de6fec..40b24b34b0 100644 --- a/aws/sdk/integration-tests/s3/tests/bucket-required.rs +++ b/aws/sdk/integration-tests/s3/tests/bucket-required.rs @@ -7,7 +7,7 @@ use aws_config::SdkConfig; use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::config::{Credentials, Region, StalledStreamProtectionConfig}; use aws_sdk_s3::Client; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; #[tokio::test] async fn dont_dispatch_when_bucket_is_unset() { diff --git a/aws/sdk/integration-tests/s3/tests/checksums.rs b/aws/sdk/integration-tests/s3/tests/checksums.rs index 695b141b83..a3bfa54c60 100644 --- a/aws/sdk/integration-tests/s3/tests/checksums.rs +++ b/aws/sdk/integration-tests/s3/tests/checksums.rs @@ -8,12 +8,11 @@ use aws_config::SdkConfig; use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::config::{Credentials, Region, StalledStreamProtectionConfig}; +use aws_sdk_s3::primitives::ByteStream; use aws_sdk_s3::types::ChecksumMode; use aws_sdk_s3::{operation::get_object::GetObjectOutput, types::ChecksumAlgorithm}; use aws_sdk_s3::{Client, Config}; -use aws_smithy_runtime::client::http::test_util::{ - capture_request, ReplayEvent, StaticReplayClient, -}; +use aws_smithy_http_client::test_util::{capture_request, ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; use http::header::AUTHORIZATION; use http::{HeaderValue, Uri}; @@ -319,14 +318,14 @@ async fn test_sha256_checksum_on_streaming_request() { .await } -async fn collect_body_into_string(mut body: aws_smithy_types::body::SdkBody) -> String { +async fn collect_body_into_string(body: aws_smithy_types::body::SdkBody) -> String { use bytes::Buf; use bytes_utils::SegmentedBuf; - use http_body::Body; use std::io::Read; + let mut stream = ByteStream::new(body); let mut output = SegmentedBuf::new(); - while let Some(buf) = body.data().await { + while let Some(buf) = stream.next().await { output.push(buf.unwrap()); } diff --git a/aws/sdk/integration-tests/s3/tests/config-override.rs b/aws/sdk/integration-tests/s3/tests/config-override.rs index 653313e238..a9378c1d51 100644 --- a/aws/sdk/integration-tests/s3/tests/config-override.rs +++ b/aws/sdk/integration-tests/s3/tests/config-override.rs @@ -6,7 +6,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::Client; -use aws_smithy_runtime::client::http::test_util::{capture_request, CaptureRequestReceiver}; +use aws_smithy_http_client::test_util::{capture_request, CaptureRequestReceiver}; use aws_types::SdkConfig; fn test_client() -> (CaptureRequestReceiver, Client) { diff --git a/aws/sdk/integration-tests/s3/tests/content-length-enforcement.rs b/aws/sdk/integration-tests/s3/tests/content-length-enforcement.rs index 15bc78b276..a9c37c476d 100644 --- a/aws/sdk/integration-tests/s3/tests/content-length-enforcement.rs +++ b/aws/sdk/integration-tests/s3/tests/content-length-enforcement.rs @@ -4,7 +4,7 @@ */ use aws_sdk_s3::{config::Region, error::DisplayErrorContext, Client, Config}; -use aws_smithy_runtime::client::http::test_util::dvr::ReplayingClient; +use aws_smithy_http_client::test_util::dvr::ReplayingClient; #[tokio::test] async fn test_content_length_enforcement_is_not_applied_to_head_request() { diff --git a/aws/sdk/integration-tests/s3/tests/customizable-operation.rs b/aws/sdk/integration-tests/s3/tests/customizable-operation.rs index 891f1a1244..64d304dd32 100644 --- a/aws/sdk/integration-tests/s3/tests/customizable-operation.rs +++ b/aws/sdk/integration-tests/s3/tests/customizable-operation.rs @@ -7,7 +7,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::presigning::PresigningConfig; use aws_sdk_s3::{Client, Config}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; use http::HeaderValue; use std::time::{Duration, SystemTime}; diff --git a/aws/sdk/integration-tests/s3/tests/endpoints.rs b/aws/sdk/integration-tests/s3/tests/endpoints.rs index 6b4f88c8f8..956be0da5d 100644 --- a/aws/sdk/integration-tests/s3/tests/endpoints.rs +++ b/aws/sdk/integration-tests/s3/tests/endpoints.rs @@ -9,7 +9,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::config::Builder; use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::{Client, Config}; -use aws_smithy_runtime::client::http::test_util::{capture_request, CaptureRequestReceiver}; +use aws_smithy_http_client::test_util::{capture_request, CaptureRequestReceiver}; fn test_client(update_builder: fn(Builder) -> Builder) -> (CaptureRequestReceiver, Client) { let (http_client, captured_request) = capture_request(None); diff --git a/aws/sdk/integration-tests/s3/tests/expires_interceptor.rs b/aws/sdk/integration-tests/s3/tests/expires_interceptor.rs index 5d0e0cd16b..eaa49b5e82 100644 --- a/aws/sdk/integration-tests/s3/tests/expires_interceptor.rs +++ b/aws/sdk/integration-tests/s3/tests/expires_interceptor.rs @@ -5,7 +5,7 @@ #![cfg(feature = "test-util")] use aws_sdk_s3::{config::Region, Client, Config}; -use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; +use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; use aws_smithy_types::date_time::{DateTime, Format}; diff --git a/aws/sdk/integration-tests/s3/tests/express.rs b/aws/sdk/integration-tests/s3/tests/express.rs index 8621b6c108..a278d65186 100644 --- a/aws/sdk/integration-tests/s3/tests/express.rs +++ b/aws/sdk/integration-tests/s3/tests/express.rs @@ -13,10 +13,8 @@ use aws_sdk_s3::presigning::PresigningConfig; use aws_sdk_s3::primitives::SdkBody; use aws_sdk_s3::types::ChecksumAlgorithm; use aws_sdk_s3::{Client, Config}; -use aws_smithy_runtime::client::http::test_util::dvr::ReplayingClient; -use aws_smithy_runtime::client::http::test_util::{ - capture_request, ReplayEvent, StaticReplayClient, -}; +use aws_smithy_http_client::test_util::dvr::ReplayingClient; +use aws_smithy_http_client::test_util::{capture_request, ReplayEvent, StaticReplayClient}; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; use aws_smithy_types::endpoint::Endpoint; use http::Uri; diff --git a/aws/sdk/integration-tests/s3/tests/identity-cache.rs b/aws/sdk/integration-tests/s3/tests/identity-cache.rs index 6fa6a0aaf6..e117e439da 100644 --- a/aws/sdk/integration-tests/s3/tests/identity-cache.rs +++ b/aws/sdk/integration-tests/s3/tests/identity-cache.rs @@ -12,7 +12,7 @@ use aws_credential_types::{ Credentials, }; use aws_sdk_s3::Client; -use aws_smithy_runtime::client::http::test_util::infallible_client_fn; +use aws_smithy_http_client::test_util::infallible_client_fn; // NOTE: These tests are _not_ S3 specific and would apply to any AWS SDK but due to the need to consume `aws-config` // (which depends on relocated runtime crates) we can't make this an `awsSdkIntegrationTest(..)`. diff --git a/aws/sdk/integration-tests/s3/tests/ignore-invalid-xml-body-root.rs b/aws/sdk/integration-tests/s3/tests/ignore-invalid-xml-body-root.rs index 1ab6a6ee5d..b4defc9f20 100644 --- a/aws/sdk/integration-tests/s3/tests/ignore-invalid-xml-body-root.rs +++ b/aws/sdk/integration-tests/s3/tests/ignore-invalid-xml-body-root.rs @@ -8,7 +8,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::Config; use aws_sdk_s3::{config::Credentials, config::Region, types::ObjectAttributes, Client}; -use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; +use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; const RESPONSE_BODY_XML: &[u8] = b"\ne1AsOh9IyGCa4hLN+2Od7jlnP14="; diff --git a/aws/sdk/integration-tests/s3/tests/interceptors.rs b/aws/sdk/integration-tests/s3/tests/interceptors.rs index b8e1e07c49..c6ac0553fa 100644 --- a/aws/sdk/integration-tests/s3/tests/interceptors.rs +++ b/aws/sdk/integration-tests/s3/tests/interceptors.rs @@ -6,7 +6,7 @@ use aws_sdk_s3::config::interceptors::BeforeTransmitInterceptorContextMut; use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::Client; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; use aws_smithy_runtime_api::box_error::BoxError; use aws_smithy_runtime_api::client::interceptors::Intercept; use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; diff --git a/aws/sdk/integration-tests/s3/tests/naughty-string-metadata.rs b/aws/sdk/integration-tests/s3/tests/naughty-string-metadata.rs index 22d09d1b1f..30c0a0b83b 100644 --- a/aws/sdk/integration-tests/s3/tests/naughty-string-metadata.rs +++ b/aws/sdk/integration-tests/s3/tests/naughty-string-metadata.rs @@ -8,7 +8,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::Config; use aws_sdk_s3::{config::Credentials, config::Region, primitives::ByteStream, Client}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; use http::HeaderValue; const NAUGHTY_STRINGS: &str = include_str!("blns/blns.txt"); diff --git a/aws/sdk/integration-tests/s3/tests/no_auth.rs b/aws/sdk/integration-tests/s3/tests/no_auth.rs index 644e05addc..30c2d21513 100644 --- a/aws/sdk/integration-tests/s3/tests/no_auth.rs +++ b/aws/sdk/integration-tests/s3/tests/no_auth.rs @@ -4,7 +4,7 @@ */ use aws_sdk_s3::{Client, Config}; -use aws_smithy_runtime::client::http::test_util::dvr::ReplayingClient; +use aws_smithy_http_client::test_util::dvr::ReplayingClient; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; #[tokio::test] diff --git a/aws/sdk/integration-tests/s3/tests/normalize-uri-path.rs b/aws/sdk/integration-tests/s3/tests/normalize-uri-path.rs index 135fb35df8..a2e746d1e9 100644 --- a/aws/sdk/integration-tests/s3/tests/normalize-uri-path.rs +++ b/aws/sdk/integration-tests/s3/tests/normalize-uri-path.rs @@ -7,7 +7,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::primitives::ByteStream; use aws_sdk_s3::Config; use aws_sdk_s3::{config::Credentials, config::Region, Client}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; #[tokio::test] async fn test_operation_should_not_normalize_uri_path() { diff --git a/aws/sdk/integration-tests/s3/tests/query-strings-are-correctly-encoded.rs b/aws/sdk/integration-tests/s3/tests/query-strings-are-correctly-encoded.rs index 31870702dd..d2de92f3f9 100644 --- a/aws/sdk/integration-tests/s3/tests/query-strings-are-correctly-encoded.rs +++ b/aws/sdk/integration-tests/s3/tests/query-strings-are-correctly-encoded.rs @@ -9,7 +9,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::operation::list_objects_v2::ListObjectsV2Error; use aws_sdk_s3::{Client, Config}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; #[tokio::test] async fn test_s3_signer_query_string_with_all_valid_chars() { diff --git a/aws/sdk/integration-tests/s3/tests/reconnects.rs b/aws/sdk/integration-tests/s3/tests/reconnects.rs index 5390cb2850..acc078c22a 100644 --- a/aws/sdk/integration-tests/s3/tests/reconnects.rs +++ b/aws/sdk/integration-tests/s3/tests/reconnects.rs @@ -6,8 +6,7 @@ use aws_sdk_s3::config::retry::{ReconnectMode, RetryConfig}; use aws_sdk_s3::config::{Credentials, Region, SharedAsyncSleep}; use aws_smithy_async::rt::sleep::TokioSleep; -use aws_smithy_runtime::client::http::test_util::wire::{ReplayedEvent, WireMockServer}; -use aws_smithy_runtime::{ev, match_events}; +use aws_smithy_http_client::test_util::wire::{ev, match_events, ReplayedEvent, WireMockServer}; #[tokio::test] async fn test_disable_reconnect_on_503() { diff --git a/aws/sdk/integration-tests/s3/tests/recursion-detection.rs b/aws/sdk/integration-tests/s3/tests/recursion-detection.rs index adcd13a20c..a986552259 100644 --- a/aws/sdk/integration-tests/s3/tests/recursion-detection.rs +++ b/aws/sdk/integration-tests/s3/tests/recursion-detection.rs @@ -7,7 +7,7 @@ use aws_config::SdkConfig; use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::Client; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; #[tokio::test] async fn recursion_detection_applied() { diff --git a/aws/sdk/integration-tests/s3/tests/request_id.rs b/aws/sdk/integration-tests/s3/tests/request_id.rs index 886b2d5baf..5a806d7e1a 100644 --- a/aws/sdk/integration-tests/s3/tests/request_id.rs +++ b/aws/sdk/integration-tests/s3/tests/request_id.rs @@ -6,7 +6,7 @@ use aws_sdk_s3::operation::get_object::GetObjectError; use aws_sdk_s3::operation::{RequestId, RequestIdExt}; use aws_sdk_s3::{config::Credentials, config::Region, Client, Config}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; use aws_smithy_types::body::SdkBody; #[tokio::test] diff --git a/aws/sdk/integration-tests/s3/tests/request_information_headers.rs b/aws/sdk/integration-tests/s3/tests/request_information_headers.rs index c444aa5b88..c8ced3ed21 100644 --- a/aws/sdk/integration-tests/s3/tests/request_information_headers.rs +++ b/aws/sdk/integration-tests/s3/tests/request_information_headers.rs @@ -15,7 +15,7 @@ use aws_sdk_s3::Client; use aws_smithy_async::test_util::InstantSleep; use aws_smithy_async::test_util::ManualTimeSource; use aws_smithy_async::time::SharedTimeSource; -use aws_smithy_runtime::client::http::test_util::dvr::ReplayingClient; +use aws_smithy_http_client::test_util::dvr::ReplayingClient; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; use aws_smithy_runtime_api::box_error::BoxError; use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; diff --git a/aws/sdk/integration-tests/s3/tests/required-query-params.rs b/aws/sdk/integration-tests/s3/tests/required-query-params.rs index d9604260ea..77437c7222 100644 --- a/aws/sdk/integration-tests/s3/tests/required-query-params.rs +++ b/aws/sdk/integration-tests/s3/tests/required-query-params.rs @@ -6,7 +6,7 @@ use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::error::DisplayErrorContext; use aws_sdk_s3::Client; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; use aws_smithy_types::error::operation::BuildError; #[tokio::test] diff --git a/aws/sdk/integration-tests/s3/tests/retry-classifier-customization.rs b/aws/sdk/integration-tests/s3/tests/retry-classifier-customization.rs index ecac15f75c..4a7eaeb50f 100644 --- a/aws/sdk/integration-tests/s3/tests/retry-classifier-customization.rs +++ b/aws/sdk/integration-tests/s3/tests/retry-classifier-customization.rs @@ -7,7 +7,7 @@ use aws_sdk_s3::config::interceptors::InterceptorContext; use aws_sdk_s3::config::retry::{ClassifyRetry, RetryAction, RetryConfig}; use aws_sdk_s3::config::SharedAsyncSleep; use aws_smithy_async::rt::sleep::TokioSleep; -use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; +use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_runtime_api::client::retries::classifiers::RetryClassifierPriority; use aws_smithy_types::body::SdkBody; use std::sync::{Arc, Mutex}; diff --git a/aws/sdk/integration-tests/s3/tests/select-object-content.rs b/aws/sdk/integration-tests/s3/tests/select-object-content.rs index d9eb6d6df4..8c7d93c123 100644 --- a/aws/sdk/integration-tests/s3/tests/select-object-content.rs +++ b/aws/sdk/integration-tests/s3/tests/select-object-content.rs @@ -11,8 +11,8 @@ use aws_sdk_s3::types::{ OutputSerialization, SelectObjectContentEventStream, }; use aws_sdk_s3::Client; +use aws_smithy_http_client::test_util::dvr::{Event, ReplayingClient}; use aws_smithy_protocol_test::{assert_ok, validate_body, MediaType}; -use aws_smithy_runtime::client::http::test_util::dvr::{Event, ReplayingClient}; use std::error::Error; #[tokio::test] diff --git a/aws/sdk/integration-tests/s3/tests/service_timeout_overrides.rs b/aws/sdk/integration-tests/s3/tests/service_timeout_overrides.rs index 062b04a609..62022d5cd5 100644 --- a/aws/sdk/integration-tests/s3/tests/service_timeout_overrides.rs +++ b/aws/sdk/integration-tests/s3/tests/service_timeout_overrides.rs @@ -7,7 +7,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_credential_types::Credentials; use aws_smithy_async::assert_elapsed; use aws_smithy_async::rt::sleep::{SharedAsyncSleep, TokioSleep}; -use aws_smithy_runtime::client::http::test_util::NeverClient; +use aws_smithy_http_client::test_util::NeverClient; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; use aws_smithy_runtime_api::client::behavior_version::BehaviorVersion; use aws_smithy_runtime_api::client::result::SdkError; diff --git a/aws/sdk/integration-tests/s3/tests/signing-it.rs b/aws/sdk/integration-tests/s3/tests/signing-it.rs index 08f1cc29d8..2566fa21b8 100644 --- a/aws/sdk/integration-tests/s3/tests/signing-it.rs +++ b/aws/sdk/integration-tests/s3/tests/signing-it.rs @@ -8,7 +8,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::{Client, Config}; -use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; +use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; use http::header::AUTHORIZATION; diff --git a/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs b/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs index 283999d60e..a4a5a71df4 100644 --- a/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs +++ b/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs @@ -46,10 +46,10 @@ impl Body for SlowBody { type Data = Bytes; type Error = BoxError; - fn poll_data( + fn poll_frame( mut self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { loop { let mut state = SlowBodyState::Taken; std::mem::swap(&mut state, &mut self.state); @@ -63,24 +63,17 @@ impl Body for SlowBody { }, SlowBodyState::Send => { self.state = SlowBodyState::Wait(Box::pin(sleep(Duration::from_micros(100)))); - return Poll::Ready(Some(Ok(Bytes::from_static( + return Poll::Ready(Some(Ok(http_body::Frame::data(Bytes::from_static( b"data_data_data_data_data_data_data_data_data_data_data_data_\ data_data_data_data_data_data_data_data_data_data_data_data_\ data_data_data_data_data_data_data_data_data_data_data_data_\ data_data_data_data_data_data_data_data_data_data_data_data_", - )))); + ))))); } SlowBodyState::Taken => unreachable!(), } } } - - fn poll_trailers( - self: Pin<&mut Self>, - _cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - Poll::Ready(Ok(None)) - } } #[tokio::test] @@ -103,7 +96,7 @@ async fn test_stalled_stream_protection_defaults_for_upload() { .put_object() .bucket("a-test-bucket") .key("stalled-stream-test.txt") - .body(ByteStream::new(SdkBody::from_body_0_4(SlowBody::new()))) + .body(ByteStream::new(SdkBody::from_body_1_x(SlowBody::new()))) .send() .await .expect_err("upload stream stalled out"); diff --git a/aws/sdk/integration-tests/s3/tests/status-200-errors.rs b/aws/sdk/integration-tests/s3/tests/status-200-errors.rs index d04ad09408..7aaa05a2af 100644 --- a/aws/sdk/integration-tests/s3/tests/status-200-errors.rs +++ b/aws/sdk/integration-tests/s3/tests/status-200-errors.rs @@ -7,8 +7,8 @@ use aws_config::retry::{RetryConfigBuilder, RetryMode}; use aws_credential_types::provider::SharedCredentialsProvider; use aws_credential_types::Credentials; use aws_sdk_s3::Client; +use aws_smithy_http_client::test_util::infallible_client_fn; use aws_smithy_runtime::assert_str_contains; -use aws_smithy_runtime::client::http::test_util::infallible_client_fn; use aws_smithy_types::body::SdkBody; use aws_smithy_types::error::metadata::ProvideErrorMetadata; use aws_types::region::Region; diff --git a/aws/sdk/integration-tests/s3/tests/streaming-response.rs b/aws/sdk/integration-tests/s3/tests/streaming-response.rs index 1bc4eef8a9..2f7d3dfd78 100644 --- a/aws/sdk/integration-tests/s3/tests/streaming-response.rs +++ b/aws/sdk/integration-tests/s3/tests/streaming-response.rs @@ -8,8 +8,8 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::error::DisplayErrorContext; use aws_sdk_s3::Client; +use aws_smithy_http_client::test_util::infallible_client_fn; use aws_smithy_runtime::assert_str_contains; -use aws_smithy_runtime::client::http::test_util::infallible_client_fn; use aws_smithy_types::body::SdkBody; use bytes::BytesMut; use http::header::CONTENT_LENGTH; diff --git a/aws/sdk/integration-tests/s3/tests/timeouts.rs b/aws/sdk/integration-tests/s3/tests/timeouts.rs index 7f0f509f00..f89a0b7fcb 100644 --- a/aws/sdk/integration-tests/s3/tests/timeouts.rs +++ b/aws/sdk/integration-tests/s3/tests/timeouts.rs @@ -12,7 +12,7 @@ use aws_sdk_s3::types::{ }; use aws_sdk_s3::{Client, Config}; use aws_smithy_async::assert_elapsed; -use aws_smithy_runtime::client::http::test_util::NeverClient; +use aws_smithy_http_client::test_util::NeverClient; use std::future::Future; use std::net::SocketAddr; use std::time::Duration; diff --git a/aws/sdk/integration-tests/s3control/Cargo.toml b/aws/sdk/integration-tests/s3control/Cargo.toml index fc059b2837..92b604f29c 100644 --- a/aws/sdk/integration-tests/s3control/Cargo.toml +++ b/aws/sdk/integration-tests/s3control/Cargo.toml @@ -18,11 +18,12 @@ test-util = [] aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] } aws-sdk-s3control = { path = "../../build/aws-sdk/sdk/s3control", features = ["test-util", "behavior-version-latest"] } aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async" } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } aws-types = { path = "../../build/aws-sdk/sdk/aws-types" } bytes = "1.0.0" -http = "0.2.0" +http = "1" serde_json = "1.0.0" tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/s3control/tests/signing-it.rs b/aws/sdk/integration-tests/s3control/tests/signing-it.rs index b235f7aa1d..b137aa6f68 100644 --- a/aws/sdk/integration-tests/s3control/tests/signing-it.rs +++ b/aws/sdk/integration-tests/s3control/tests/signing-it.rs @@ -6,7 +6,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3control::config::{Credentials, Region}; use aws_sdk_s3control::{Client, Config}; -use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; +use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; use http::header::AUTHORIZATION; diff --git a/aws/sdk/integration-tests/sts/Cargo.toml b/aws/sdk/integration-tests/sts/Cargo.toml index c629b2d316..8d7bde5802 100644 --- a/aws/sdk/integration-tests/sts/Cargo.toml +++ b/aws/sdk/integration-tests/sts/Cargo.toml @@ -14,7 +14,8 @@ publish = false aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] } aws-sdk-sts = { path = "../../build/aws-sdk/sdk/sts", features = ["behavior-version-latest"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } +aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/sts/tests/signing-it.rs b/aws/sdk/integration-tests/sts/tests/signing-it.rs index 1b0a4e918e..695d3ba14a 100644 --- a/aws/sdk/integration-tests/sts/tests/signing-it.rs +++ b/aws/sdk/integration-tests/sts/tests/signing-it.rs @@ -4,7 +4,7 @@ */ use aws_sdk_sts::config::{Credentials, Region}; -use aws_smithy_runtime::client::http::test_util::capture_request; +use aws_smithy_http_client::test_util::capture_request; #[tokio::test] async fn assume_role_signed() { diff --git a/aws/sdk/integration-tests/timestreamquery/Cargo.toml b/aws/sdk/integration-tests/timestreamquery/Cargo.toml index ea94cf9bc9..d9dc902fa4 100644 --- a/aws/sdk/integration-tests/timestreamquery/Cargo.toml +++ b/aws/sdk/integration-tests/timestreamquery/Cargo.toml @@ -15,6 +15,7 @@ aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", aws-sdk-timestreamquery = { path = "../../build/aws-sdk/sdk/timestreamquery", features = ["behavior-version-latest"] } aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async", features = ["test-util"] } aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["test-util"] } +aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-types = { path = "../../build/aws-sdk/sdk/aws-types" } tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = "0.3.17" diff --git a/aws/sdk/integration-tests/timestreamquery/tests/endpoint_disco.rs b/aws/sdk/integration-tests/timestreamquery/tests/endpoint_disco.rs index d78ca76266..fe44998425 100644 --- a/aws/sdk/integration-tests/timestreamquery/tests/endpoint_disco.rs +++ b/aws/sdk/integration-tests/timestreamquery/tests/endpoint_disco.rs @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -use aws_smithy_runtime::client::http::test_util::dvr::ReplayingClient; +use aws_smithy_http_client::test_util::dvr::ReplayingClient; #[tokio::test] async fn do_endpoint_discovery() { diff --git a/aws/sdk/integration-tests/transcribestreaming/Cargo.toml b/aws/sdk/integration-tests/transcribestreaming/Cargo.toml index 221d7b4b78..da498c5893 100644 --- a/aws/sdk/integration-tests/transcribestreaming/Cargo.toml +++ b/aws/sdk/integration-tests/transcribestreaming/Cargo.toml @@ -14,11 +14,11 @@ aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", aws-sdk-transcribestreaming = { path = "../../build/aws-sdk/sdk/transcribestreaming", features = ["behavior-version-latest"] } aws-smithy-eventstream = { path = "../../build/aws-sdk/sdk/aws-smithy-eventstream" } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } -aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] } +aws-smithy-http-client= { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } bytes = "1.0.0" futures-core = "0.3.29" hound = "3.4.0" -http = "0.2.0" +http = "1" serde_json = "1.0.0" tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing = "0.1" diff --git a/aws/sdk/integration-tests/transcribestreaming/tests/test.rs b/aws/sdk/integration-tests/transcribestreaming/tests/test.rs index 5b761eba2c..996f0fc265 100644 --- a/aws/sdk/integration-tests/transcribestreaming/tests/test.rs +++ b/aws/sdk/integration-tests/transcribestreaming/tests/test.rs @@ -17,7 +17,7 @@ use aws_sdk_transcribestreaming::types::{ }; use aws_sdk_transcribestreaming::{Client, Config}; use aws_smithy_eventstream::frame::{read_message_from, DecodedFrame, MessageFrameDecoder}; -use aws_smithy_runtime::client::http::test_util::dvr::{Event, ReplayingClient}; +use aws_smithy_http_client::test_util::dvr::{Event, ReplayingClient}; use bytes::BufMut; use futures_core::Stream; use std::collections::{BTreeMap, BTreeSet}; diff --git a/rust-runtime/aws-smithy-http-client/src/test_util/capture_request.rs b/rust-runtime/aws-smithy-http-client/src/test_util/capture_request.rs index eacf483db3..ca0da601f0 100644 --- a/rust-runtime/aws-smithy-http-client/src/test_util/capture_request.rs +++ b/rust-runtime/aws-smithy-http-client/src/test_util/capture_request.rs @@ -100,6 +100,12 @@ impl CaptureRequestReceiver { /// ); /// ``` pub fn capture_request( + response: Option>, +) -> (CaptureRequestHandler, CaptureRequestReceiver) { + capture_request_inner(response) +} + +fn capture_request_inner( response: Option>, ) -> (CaptureRequestHandler, CaptureRequestReceiver) { let (tx, rx) = oneshot::channel(); @@ -126,7 +132,7 @@ pub fn capture_request( pub fn legacy_capture_request( response: Option>, ) -> (CaptureRequestHandler, CaptureRequestReceiver) { - capture_request(response) + capture_request_inner(response) } #[cfg(test)] @@ -138,8 +144,8 @@ mod test { #[cfg(feature = "legacy-test-util")] #[tokio::test] async fn test_can_plug_in_http_02x() { - use super::capture_request; - let (capture_client, _request) = capture_request(Some( + use super::legacy_capture_request; + let (capture_client, _request) = legacy_capture_request(Some( http_02x::Response::builder() .status(202) .body(SdkBody::empty()) diff --git a/rust-runtime/aws-smithy-http-client/src/test_util/dvr/record.rs b/rust-runtime/aws-smithy-http-client/src/test_util/dvr/record.rs index 7f5fb1dc4b..946bbeed1d 100644 --- a/rust-runtime/aws-smithy-http-client/src/test_util/dvr/record.rs +++ b/rust-runtime/aws-smithy-http-client/src/test_util/dvr/record.rs @@ -30,7 +30,7 @@ use tokio::task::JoinHandle; /// ```rust,ignore /// use aws_smithy_async::rt::sleep::default_async_sleep; /// use aws_smithy_runtime::client::http::hyper_014::default_connector; -/// use aws_smithy_runtime::client::http::test_util::dvr::RecordingClient; +/// use aws_smithy_http_client::test_util::dvr::RecordingClient; /// use aws_smithy_runtime_api::client::http::HttpConnectorSettingsBuilder; /// use aws_sdk_s3::{Client, Config}; /// diff --git a/rust-runtime/aws-smithy-runtime-api/src/http/headers.rs b/rust-runtime/aws-smithy-runtime-api/src/http/headers.rs index 98e571b8c2..d0f7692e77 100644 --- a/rust-runtime/aws-smithy-runtime-api/src/http/headers.rs +++ b/rust-runtime/aws-smithy-runtime-api/src/http/headers.rs @@ -321,6 +321,42 @@ mod sealed { Ok(self) } } + + #[cfg(feature = "http-1x")] + impl AsHeaderComponent for http_1x::HeaderName { + fn into_maybe_static(self) -> Result { + Ok(self.to_string().into()) + } + + fn as_str(&self) -> Result<&str, HttpError> { + Ok(self.as_ref()) + } + } + + #[cfg(feature = "http-1x")] + impl AsHeaderComponent for http_1x::HeaderValue { + fn into_maybe_static(self) -> Result { + Ok(Cow::Owned( + std::str::from_utf8(self.as_bytes()) + .map_err(|err| { + HttpError::non_utf8_header(NonUtf8Header::new_missing_name( + self.as_bytes().to_vec(), + err, + )) + })? + .to_string(), + )) + } + + fn as_str(&self) -> Result<&str, HttpError> { + std::str::from_utf8(self.as_bytes()).map_err(|err| { + HttpError::non_utf8_header(NonUtf8Header::new_missing_name( + self.as_bytes().to_vec(), + err, + )) + }) + } + } } mod header_value { From 2c10538d44a5ab13f680a479fcf631133711c649 Mon Sep 17 00:00:00 2001 From: Aaron J Todd Date: Thu, 24 Oct 2024 15:34:44 -0400 Subject: [PATCH 02/11] add todo --- rust-runtime/aws-smithy-runtime/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/rust-runtime/aws-smithy-runtime/Cargo.toml b/rust-runtime/aws-smithy-runtime/Cargo.toml index 125a2edf2a..36debd4264 100644 --- a/rust-runtime/aws-smithy-runtime/Cargo.toml +++ b/rust-runtime/aws-smithy-runtime/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/smithy-lang/smithy-rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +# TODO(hyper1) - deprecate legacy hyper features when available in cargo: https://github.com/rust-lang/cargo/issues/7130 [features] client = ["aws-smithy-runtime-api/client", "aws-smithy-types/http-body-1-x"] http-auth = ["aws-smithy-runtime-api/http-auth"] From 4c5f526ec58972810fd21afe6fe963ba8f0b3a71 Mon Sep 17 00:00:00 2001 From: Aaron Todd Date: Mon, 28 Oct 2024 13:23:26 +0000 Subject: [PATCH 03/11] deprecate http-02x types, bump breaking change for aws-smithy-http, fix tests to be agnostic from env --- aws/rust-runtime/aws-config/Cargo.lock | 4 +- aws/rust-runtime/aws-config/src/ecs.rs | 2 +- .../aws-config/src/imds/credentials.rs | 13 +++-- rust-runtime/Cargo.lock | 51 ++++++++++--------- rust-runtime/aws-smithy-http/Cargo.toml | 4 +- rust-runtime/aws-smithy-http/src/endpoint.rs | 26 +++------- rust-runtime/aws-smithy-runtime/Cargo.toml | 2 +- .../aws-smithy-runtime/src/client/endpoint.rs | 4 ++ 8 files changed, 52 insertions(+), 54 deletions(-) diff --git a/aws/rust-runtime/aws-config/Cargo.lock b/aws/rust-runtime/aws-config/Cargo.lock index 9b32a7ba37..94dd145e01 100644 --- a/aws/rust-runtime/aws-config/Cargo.lock +++ b/aws/rust-runtime/aws-config/Cargo.lock @@ -210,7 +210,7 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.60.11" +version = "0.70.0" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", @@ -218,6 +218,7 @@ dependencies = [ "bytes-utils", "futures-core", "http 0.2.12", + "http 1.1.0", "http-body 0.4.6", "once_cell", "percent-encoding", @@ -296,6 +297,7 @@ dependencies = [ "bytes", "fastrand", "http 0.2.12", + "http 1.1.0", "http-body 0.4.6", "http-body 1.0.1", "httparse", diff --git a/aws/rust-runtime/aws-config/src/ecs.rs b/aws/rust-runtime/aws-config/src/ecs.rs index 3f89e4d5cc..288f55bf27 100644 --- a/aws/rust-runtime/aws-config/src/ecs.rs +++ b/aws/rust-runtime/aws-config/src/ecs.rs @@ -58,7 +58,7 @@ use crate::http_credential_provider::HttpCredentialProvider; use crate::provider_config::ProviderConfig; use aws_credential_types::provider::{self, error::CredentialsError, future, ProvideCredentials}; -use aws_smithy_runtime::client::endpoint::apply_endpoint; +use aws_smithy_http::endpoint::apply_endpoint; use aws_smithy_runtime_api::client::dns::{ResolveDns, ResolveDnsError, SharedDnsResolver}; use aws_smithy_runtime_api::client::http::HttpConnectorSettings; use aws_smithy_runtime_api::shared::IntoShared; diff --git a/aws/rust-runtime/aws-config/src/imds/credentials.rs b/aws/rust-runtime/aws-config/src/imds/credentials.rs index 21084251c4..ece49f0398 100644 --- a/aws/rust-runtime/aws-config/src/imds/credentials.rs +++ b/aws/rust-runtime/aws-config/src/imds/credentials.rs @@ -208,12 +208,12 @@ impl ImdsCredentialsProvider { async fn retrieve_credentials(&self) -> provider::Result { if self.imds_disabled() { - tracing::debug!( - "IMDS disabled because AWS_EC2_METADATA_DISABLED env var was set to `true`" + let err = format!( + "IMDS disabled by {} env var set to `true`", + super::env::EC2_METADATA_DISABLED ); - return Err(CredentialsError::not_loaded( - "IMDS disabled by AWS_ECS_METADATA_DISABLED env var", - )); + tracing::debug!(err); + return Err(CredentialsError::not_loaded(err)); } tracing::debug!("loading credentials from IMDS"); let profile: Cow<'_, str> = match &self.profile { @@ -322,6 +322,7 @@ mod test { ]); let client = ImdsCredentialsProvider::builder() .imds_client(make_imds_client(&http_client)) + .configure(&ProviderConfig::no_configuration()) .build(); let creds1 = client.provide_credentials().await.expect("valid creds"); let creds2 = client.provide_credentials().await.expect("valid creds"); @@ -468,6 +469,7 @@ mod test { let expected = aws_credential_types::Credentials::for_tests(); let provider = ImdsCredentialsProvider::builder() .imds_client(client) + .configure(&ProviderConfig::no_configuration()) // seed fallback credentials for testing .last_retrieved_credentials(expected.clone()) .build(); @@ -515,6 +517,7 @@ mod test { ]); let provider = ImdsCredentialsProvider::builder() .imds_client(make_imds_client(&http_client)) + .configure(&ProviderConfig::no_configuration()) .build(); let creds1 = provider.provide_credentials().await.expect("valid creds"); assert_eq!(creds1.access_key_id(), "ASIARTEST"); diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index 9c65a2f5be..aa579bd081 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -203,7 +203,7 @@ dependencies = [ "aws-sigv4", "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-http 0.60.11", "aws-smithy-runtime 1.7.2", "aws-smithy-runtime-api 1.7.2", "aws-smithy-types 1.2.7", @@ -232,7 +232,7 @@ dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-checksums 0.60.12", "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-http 0.60.11", "aws-smithy-json 0.60.7 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime 1.7.2", "aws-smithy-runtime-api 1.7.2", @@ -262,7 +262,7 @@ checksum = "cc8db6904450bafe7473c6ca9123f88cc11089e41a025408f992db4e22d3be68" dependencies = [ "aws-credential-types", "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-http 0.60.11", "aws-smithy-runtime-api 1.7.2", "aws-smithy-types 1.2.7", "bytes", @@ -320,7 +320,7 @@ version = "0.60.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "598b1689d001c4d4dc3cb386adb07d37786783aee3ac4b324bcadac116bf3d23" dependencies = [ - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-http 0.60.11", "aws-smithy-types 1.2.7", "bytes", "crc32c", @@ -339,7 +339,7 @@ dependencies = [ name = "aws-smithy-checksums" version = "0.60.13" dependencies = [ - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.70.0", "aws-smithy-types 1.2.8", "bytes", "bytes-utils", @@ -413,45 +413,46 @@ version = "0.2.0" [[package]] name = "aws-smithy-http" version = "0.60.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" dependencies = [ - "async-stream", - "aws-smithy-eventstream 0.60.5", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.8", + "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-runtime-api 1.7.2", + "aws-smithy-types 1.2.7", "bytes", "bytes-utils", "futures-core", - "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.31", "once_cell", "percent-encoding", "pin-project-lite", "pin-utils", - "proptest", - "tokio", "tracing", ] [[package]] name = "aws-smithy-http" -version = "0.60.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" +version = "0.70.0" dependencies = [ - "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7", + "async-stream", + "aws-smithy-eventstream 0.60.5", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.8", "bytes", "bytes-utils", "futures-core", + "futures-util", "http 0.2.12", + "http 1.1.0", "http-body 0.4.6", + "hyper 0.14.31", "once_cell", "percent-encoding", "pin-project-lite", "pin-utils", + "proptest", + "tokio", "tracing", ] @@ -496,7 +497,7 @@ name = "aws-smithy-http-server" version = "0.63.3" dependencies = [ "aws-smithy-cbor", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.70.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime-api 1.7.3", "aws-smithy-types 1.2.8", @@ -526,7 +527,7 @@ dependencies = [ name = "aws-smithy-http-server-python" version = "0.63.2" dependencies = [ - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.70.0", "aws-smithy-http-server", "aws-smithy-json 0.60.7", "aws-smithy-types 1.2.8", @@ -644,7 +645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a065c0fe6fdbdf9f11817eb68582b2ab4aff9e9c39e986ae48f7ec576c6322db" dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-http 0.60.11", "aws-smithy-protocol-test 0.63.0 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime-api 1.7.2", "aws-smithy-types 1.2.7", @@ -675,7 +676,7 @@ version = "1.8.0" dependencies = [ "approx", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.70.0", "aws-smithy-http-client", "aws-smithy-runtime-api 1.7.3", "aws-smithy-types 1.2.8", @@ -806,7 +807,7 @@ dependencies = [ name = "aws-smithy-wasm" version = "0.1.3" dependencies = [ - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.70.0", "aws-smithy-runtime-api 1.7.3", "aws-smithy-types 1.2.8", "bytes", @@ -2001,7 +2002,7 @@ version = "0.1.0" dependencies = [ "aws-smithy-cbor", "aws-smithy-compression", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.70.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", "aws-smithy-runtime-api 1.7.3", diff --git a/rust-runtime/aws-smithy-http/Cargo.toml b/rust-runtime/aws-smithy-http/Cargo.toml index b915bc3941..7cea34f365 100644 --- a/rust-runtime/aws-smithy-http/Cargo.toml +++ b/rust-runtime/aws-smithy-http/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-http" -version = "0.60.11" +version = "0.70.0" authors = [ "AWS Rust SDK Team ", "Russell Cohen ", @@ -20,7 +20,9 @@ aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["clie aws-smithy-types = { path = "../aws-smithy-types", features = ["byte-stream-poll-next", "http-body-0-4-x"] } bytes = "1" bytes-utils = "0.1" +# TODO(hyper1) - we've bumped to 0.70.x from 0.60.x (semver major). Complete the breaking changes by updating to http 1.x ecosystem fully in this crate. Also remove hyper 0.14 from dev http-02x = { package = "http", version = "0.2.3" } +http-1x = { package = "http", version = "1" } http-body-04x = { package = "http-body", version = "0.4.4" } once_cell = "1.10" percent-encoding = "2.1.0" diff --git a/rust-runtime/aws-smithy-http/src/endpoint.rs b/rust-runtime/aws-smithy-http/src/endpoint.rs index 71a3012a23..3c5adc4642 100644 --- a/rust-runtime/aws-smithy-http/src/endpoint.rs +++ b/rust-runtime/aws-smithy-http/src/endpoint.rs @@ -5,10 +5,7 @@ //! Code for resolving an endpoint (URI) that a request should be sent to -#![allow(deprecated)] - -use crate::endpoint::error::InvalidEndpointError; -use http_02x::uri::{Authority, Uri}; +use aws_smithy_runtime_api::client::endpoint::{error::InvalidEndpointError, EndpointPrefix}; use std::borrow::Cow; use std::result::Result as StdResult; use std::str::FromStr; @@ -20,23 +17,12 @@ pub use error::ResolveEndpointError; #[deprecated(since = "0.60.1", note = "Was never used.")] pub type Result = std::result::Result; -/// A special type that adds support for services that have special URL-prefixing rules. -#[deprecated( - since = "0.60.1", - note = "Use aws_smithy_runtime_api::client::endpoint::EndpointPrefix instead." -)] -pub type EndpointPrefix = aws_smithy_runtime_api::client::endpoint::EndpointPrefix; - /// Apply `endpoint` to `uri` /// /// This method mutates `uri` by setting the `endpoint` on it -#[deprecated( - since = "0.60.1", - note = "Use aws_smithy_runtime::client::endpoint::apply_endpoint instead." -)] pub fn apply_endpoint( - uri: &mut Uri, - endpoint: &Uri, + uri: &mut http_1x::Uri, + endpoint: &http_1x::Uri, prefix: Option<&EndpointPrefix>, ) -> StdResult<(), InvalidEndpointError> { let prefix = prefix.map(EndpointPrefix::as_str).unwrap_or(""); @@ -50,14 +36,14 @@ pub fn apply_endpoint( } else { Cow::Borrowed(authority) }; - let authority = Authority::from_str(&authority).map_err(|err| { + let authority = http_1x::uri::Authority::from_str(&authority).map_err(|err| { InvalidEndpointError::failed_to_construct_authority(authority.into_owned(), err) })?; let scheme = *endpoint .scheme() .as_ref() .ok_or_else(InvalidEndpointError::endpoint_must_have_scheme)?; - let new_uri = Uri::builder() + let new_uri = http_1x::Uri::builder() .authority(authority) .scheme(scheme.clone()) .path_and_query(merge_paths(endpoint, uri).as_ref()) @@ -67,7 +53,7 @@ pub fn apply_endpoint( Ok(()) } -fn merge_paths<'a>(endpoint: &'a Uri, uri: &'a Uri) -> Cow<'a, str> { +fn merge_paths<'a>(endpoint: &'a http_1x::Uri, uri: &'a http_1x::Uri) -> Cow<'a, str> { if let Some(query) = endpoint.path_and_query().and_then(|pq| pq.query()) { tracing::warn!(query = %query, "query specified in endpoint will be ignored during endpoint resolution"); } diff --git a/rust-runtime/aws-smithy-runtime/Cargo.toml b/rust-runtime/aws-smithy-runtime/Cargo.toml index 36debd4264..cfab3977ac 100644 --- a/rust-runtime/aws-smithy-runtime/Cargo.toml +++ b/rust-runtime/aws-smithy-runtime/Cargo.toml @@ -39,6 +39,7 @@ bytes = "1" # We probably need to update unit tests using the `fastrand` crate when that happens fastrand = "2.0.0" http-02x = { package = "http", version = "0.2.8" } +http-1x = { package = "http", version = "1" } http-body-04x = { package = "http-body", version = "0.4.4" } http-body-1x = { package = "http-body", version = "1" } # This avoids bringing `httparse` 1.9.0 and 1.9.1 through `hyper-0-14` that break unit tests of runtime crates @@ -65,7 +66,6 @@ tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } tracing-test = "0.2.1" # FIXME - migrate to hyper-1 hyper_0_14 = { package = "hyper", version = "0.14.27", features = ["client", "server", "tcp", "http1", "http2"] } -http1 = { package = "http", version = "1" } [package.metadata.docs.rs] all-features = true diff --git a/rust-runtime/aws-smithy-runtime/src/client/endpoint.rs b/rust-runtime/aws-smithy-runtime/src/client/endpoint.rs index 26ae1c10e9..4fb90bc9ad 100644 --- a/rust-runtime/aws-smithy-runtime/src/client/endpoint.rs +++ b/rust-runtime/aws-smithy-runtime/src/client/endpoint.rs @@ -13,6 +13,10 @@ use std::str::FromStr; /// Apply `endpoint` to `uri` /// /// This method mutates `uri` by setting the `endpoint` on it +#[deprecated( + since = "1.8.0", + note = "Depends on pre 1.x http types. May be removed or feature gated in a future minor version." +)] pub fn apply_endpoint( uri: &mut http_02x::Uri, endpoint: &http_02x::Uri, From cb3235f715a8f9b60eb81239bd12fa5ddd2195bb Mon Sep 17 00:00:00 2001 From: Aaron Todd Date: Tue, 29 Oct 2024 14:51:00 +0000 Subject: [PATCH 04/11] convert aws-smithy-http to use http-1x --- aws/rust-runtime/Cargo.lock | 11 +- aws/rust-runtime/aws-config/Cargo.lock | 2 +- aws/rust-runtime/aws-inlineable/Cargo.toml | 10 +- .../src/apigateway_interceptors.rs | 4 +- .../src/glacier_interceptors.rs | 2 +- .../src/http_request_checksum.rs | 14 +- .../src/http_response_checksum.rs | 2 +- .../aws-inlineable/src/presigning.rs | 4 +- .../aws-inlineable/src/s3_request_id.rs | 7 +- aws/rust-runtime/aws-runtime/Cargo.toml | 1 + .../aws-runtime/src/content_encoding.rs | 11 +- aws/rust-runtime/aws-runtime/src/lib.rs | 2 +- aws/rust-runtime/aws-sigv4/Cargo.toml | 10 +- .../aws-sigv4/src/http_request.rs | 2 +- .../src/http_request/canonical_request.rs | 16 +- .../aws-sigv4/src/http_request/error.rs | 4 +- .../aws-sigv4/src/http_request/settings.rs | 2 +- .../aws-sigv4/src/http_request/sign.rs | 70 +++--- .../aws-sigv4/src/http_request/test.rs | 10 +- rust-runtime/Cargo.lock | 10 +- rust-runtime/aws-smithy-checksums/Cargo.toml | 9 +- .../src/body/calculate.rs | 104 ++++----- .../aws-smithy-checksums/src/body/validate.rs | 40 ++-- rust-runtime/aws-smithy-http/Cargo.toml | 8 +- rust-runtime/aws-smithy-http/src/compat.rs | 206 ++++++++++++++++++ rust-runtime/aws-smithy-http/src/header.rs | 32 +-- rust-runtime/aws-smithy-http/src/label.rs | 2 +- rust-runtime/aws-smithy-http/src/lib.rs | 5 + rust-runtime/aws-smithy-http/src/query.rs | 2 +- .../aws-smithy-http/src/query_writer.rs | 6 +- .../src/http/request.rs | 7 + rust-runtime/aws-smithy-runtime/Cargo.toml | 2 +- .../src/body/http_body_1_x.rs | 2 + rust-runtime/inlineable/Cargo.toml | 2 +- .../inlineable/src/serialization_settings.rs | 6 +- 35 files changed, 421 insertions(+), 206 deletions(-) create mode 100644 rust-runtime/aws-smithy-http/src/compat.rs diff --git a/aws/rust-runtime/Cargo.lock b/aws/rust-runtime/Cargo.lock index 6e55dd4c2f..017a001b0a 100644 --- a/aws/rust-runtime/Cargo.lock +++ b/aws/rust-runtime/Cargo.lock @@ -235,7 +235,7 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.60.13" +version = "0.70.0" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -243,8 +243,8 @@ dependencies = [ "crc32c", "crc32fast", "hex", - "http 0.2.12", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.1", "md-5", "pin-project-lite", "sha1", @@ -263,7 +263,7 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.60.11" +version = "0.70.0" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", @@ -271,7 +271,9 @@ dependencies = [ "bytes-utils", "futures-core", "http 0.2.12", + "http 1.1.0", "http-body 0.4.6", + "http-body 1.0.1", "once_cell", "percent-encoding", "pin-project-lite", @@ -327,6 +329,7 @@ dependencies = [ "bytes", "fastrand", "http 0.2.12", + "http 1.1.0", "http-body 0.4.6", "http-body 1.0.1", "httparse", diff --git a/aws/rust-runtime/aws-config/Cargo.lock b/aws/rust-runtime/aws-config/Cargo.lock index 94dd145e01..ea24351602 100644 --- a/aws/rust-runtime/aws-config/Cargo.lock +++ b/aws/rust-runtime/aws-config/Cargo.lock @@ -217,9 +217,9 @@ dependencies = [ "bytes", "bytes-utils", "futures-core", - "http 0.2.12", "http 1.1.0", "http-body 0.4.6", + "http-body 1.0.1", "once_cell", "percent-encoding", "pin-project-lite", diff --git a/aws/rust-runtime/aws-inlineable/Cargo.toml b/aws/rust-runtime/aws-inlineable/Cargo.toml index 07a00c99a1..76f97b893a 100644 --- a/aws/rust-runtime/aws-inlineable/Cargo.toml +++ b/aws/rust-runtime/aws-inlineable/Cargo.toml @@ -12,7 +12,7 @@ publish = false repository = "https://github.com/smithy-lang/smithy-rs" [features] -http_1x = ["dep:http-1x", "dep:http-body-1x", "aws-smithy-runtime-api/http-1x"] +http_1x = ["dep:http-body-1x", "aws-smithy-runtime-api/http-1x"] [dependencies] aws-credential-types = { path = "../aws-credential-types" } @@ -21,16 +21,16 @@ aws-sigv4 = { path = "../aws-sigv4" } aws-types = { path = "../aws-types" } aws-smithy-async = { path = "../../../rust-runtime/aws-smithy-async", features = ["rt-tokio"] } aws-smithy-checksums = { path = "../../../rust-runtime/aws-smithy-checksums" } -aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http" } +aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http", features = ["compat"] } aws-smithy-runtime = { path = "../../../rust-runtime/aws-smithy-runtime", features = ["client"] } aws-smithy-runtime-api = { path = "../../../rust-runtime/aws-smithy-runtime-api", features = ["client"] } -aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types", features = ["http-body-0-4-x"] } +aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types", features = ["http-body-1-x"] } bytes = "1" fastrand = "2.0.0" hex = "0.4.3" -http = "0.2.9" +http-02x = { package = "http", version = "0.2.9" } http-body = "0.4.5" -http-1x = { package = "http", version = "1", optional = true } +http-1x = { package = "http", version = "1" } http-body-1x = { package = "http-body", version = "1", optional = true } hmac = "0.12" lru = "0.12.5" diff --git a/aws/rust-runtime/aws-inlineable/src/apigateway_interceptors.rs b/aws/rust-runtime/aws-inlineable/src/apigateway_interceptors.rs index e7374eb672..baeeb20b03 100644 --- a/aws/rust-runtime/aws-inlineable/src/apigateway_interceptors.rs +++ b/aws/rust-runtime/aws-inlineable/src/apigateway_interceptors.rs @@ -10,8 +10,8 @@ use aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterce use aws_smithy_runtime_api::client::interceptors::Intercept; use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; use aws_smithy_types::config_bag::ConfigBag; -use http::header::ACCEPT; -use http::HeaderValue; +use http_1x::header::ACCEPT; +use http_1x::HeaderValue; /// Interceptor that adds an Accept header to API Gateway requests. #[derive(Debug, Default)] diff --git a/aws/rust-runtime/aws-inlineable/src/glacier_interceptors.rs b/aws/rust-runtime/aws-inlineable/src/glacier_interceptors.rs index d6a9541580..c1efd459c2 100644 --- a/aws/rust-runtime/aws-inlineable/src/glacier_interceptors.rs +++ b/aws/rust-runtime/aws-inlineable/src/glacier_interceptors.rs @@ -10,7 +10,7 @@ use std::fmt; use std::marker::PhantomData; use bytes::Bytes; -use http::header::HeaderValue; +use http_1x::header::HeaderValue; use ring::digest::{Context, Digest, SHA256}; use aws_runtime::auth::SigV4OperationSigningConfig; diff --git a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs index 3e010068c6..45880ff44d 100644 --- a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs +++ b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs @@ -22,7 +22,7 @@ use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; use aws_smithy_types::body::SdkBody; use aws_smithy_types::config_bag::{ConfigBag, Layer, Storable, StoreReplace}; use aws_smithy_types::error::operation::BuildError; -use http::HeaderValue; +use http_1x::HeaderValue; use http_body::Body; use std::{fmt, mem}; @@ -221,6 +221,8 @@ fn wrap_streaming_request_body_in_checksum_calculating_body( let aws_chunked_body_options = AwsChunkedBodyOptions::new(original_body_size, vec![trailer_len]); + let body = aws_smithy_http::compat::Http1toHttp04::new(body); + let body = AwsChunkedBody::new(body, aws_chunked_body_options); SdkBody::from_body_0_4(body) @@ -235,20 +237,20 @@ fn wrap_streaming_request_body_in_checksum_calculating_body( let headers = request.headers_mut(); headers.insert( - http::header::HeaderName::from_static("x-amz-trailer"), + http_1x::header::HeaderName::from_static("x-amz-trailer"), checksum_algorithm.into_impl().header_name(), ); headers.insert( - http::header::CONTENT_LENGTH, + http_1x::header::CONTENT_LENGTH, HeaderValue::from(encoded_content_length), ); headers.insert( - http::header::HeaderName::from_static("x-amz-decoded-content-length"), + http_1x::header::HeaderName::from_static("x-amz-decoded-content-length"), HeaderValue::from(original_body_size), ); headers.insert( - http::header::CONTENT_ENCODING, + http_1x::header::CONTENT_ENCODING, HeaderValue::from_str(AWS_CHUNKED) .map_err(BuildError::other) .expect("\"aws-chunked\" will always be a valid HeaderValue"), @@ -275,7 +277,7 @@ mod tests { async fn test_checksum_body_is_retryable() { let input_text = "Hello world"; let chunk_len_hex = format!("{:X}", input_text.len()); - let mut request: HttpRequest = http::Request::builder() + let mut request: HttpRequest = http_1x::Request::builder() .body(SdkBody::retryable(move || SdkBody::from(input_text))) .unwrap() .try_into() diff --git a/aws/rust-runtime/aws-inlineable/src/http_response_checksum.rs b/aws/rust-runtime/aws-inlineable/src/http_response_checksum.rs index 1236c9fe50..4f6f280a20 100644 --- a/aws/rust-runtime/aws-inlineable/src/http_response_checksum.rs +++ b/aws/rust-runtime/aws-inlineable/src/http_response_checksum.rs @@ -119,7 +119,7 @@ pub(crate) fn wrap_body_with_checksum_validator( use aws_smithy_checksums::body::validate; body.map(move |body| { - SdkBody::from_body_0_4(validate::ChecksumBody::new( + SdkBody::from_body_1_x(validate::ChecksumBody::new( body, checksum_algorithm.into_impl(), precalculated_checksum.clone(), diff --git a/aws/rust-runtime/aws-inlineable/src/presigning.rs b/aws/rust-runtime/aws-inlineable/src/presigning.rs index c19d160e18..8717389729 100644 --- a/aws/rust-runtime/aws-inlineable/src/presigning.rs +++ b/aws/rust-runtime/aws-inlineable/src/presigning.rs @@ -227,13 +227,13 @@ impl PresignedRequest { /// Given a body, produce an `http::Request` from this `PresignedRequest` #[deprecated = "Prefer the `make_http_1x_request()` instead by enabling the `http-1x` feature."] #[allow(deprecated)] - pub fn make_http_02x_request(&self, body: B) -> http::Request { + pub fn make_http_02x_request(&self, body: B) -> http_02x::Request { self.clone().into_http_02x_request(body) } /// Converts this `PresignedRequest` directly into an `http` request. #[deprecated = "Prefer the `into_http_1x_request` instead by enabling the `http-1x` feature."] - pub fn into_http_02x_request(self, body: B) -> http::Request { + pub fn into_http_02x_request(self, body: B) -> http_02x::Request { self.http_request .try_into_http02x() .expect("constructor validated convertibility") diff --git a/aws/rust-runtime/aws-inlineable/src/s3_request_id.rs b/aws/rust-runtime/aws-inlineable/src/s3_request_id.rs index 26cfa745e3..c916f11514 100644 --- a/aws/rust-runtime/aws-inlineable/src/s3_request_id.rs +++ b/aws/rust-runtime/aws-inlineable/src/s3_request_id.rs @@ -79,7 +79,7 @@ mod test { #[test] fn handle_missing_header() { let resp = - Response::try_from(http::Response::builder().status(400).body("").unwrap()).unwrap(); + Response::try_from(http_1x::Response::builder().status(400).body("").unwrap()).unwrap(); let mut builder = ErrorMetadata::builder().message("123"); builder = apply_extended_request_id(builder, resp.headers()); assert_eq!(builder.build().extended_request_id(), None); @@ -88,11 +88,12 @@ mod test { #[test] fn test_extended_request_id_sdk_error() { let without_extended_request_id = || { - Response::try_from(http::Response::builder().body(SdkBody::empty()).unwrap()).unwrap() + Response::try_from(http_1x::Response::builder().body(SdkBody::empty()).unwrap()) + .unwrap() }; let with_extended_request_id = || { Response::try_from( - http::Response::builder() + http_1x::Response::builder() .header("x-amz-id-2", "some-request-id") .body(SdkBody::empty()) .unwrap(), diff --git a/aws/rust-runtime/aws-runtime/Cargo.toml b/aws/rust-runtime/aws-runtime/Cargo.toml index 2265a7f3b4..dd0e16365a 100644 --- a/aws/rust-runtime/aws-runtime/Cargo.toml +++ b/aws/rust-runtime/aws-runtime/Cargo.toml @@ -27,6 +27,7 @@ aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types" } aws-types = { path = "../aws-types" } bytes = "1.1" fastrand = "2.0.0" +# TODO(hyper1) - can we make these pre 1.x http crates optional dependencies assuming usage is internal? http-02x = { package = "http", version = "0.2.3" } http-body-04x = { package = "http-body", version = "0.4.5" } http-1x = { package = "http", version = "1.1.0", optional = true } diff --git a/aws/rust-runtime/aws-runtime/src/content_encoding.rs b/aws/rust-runtime/aws-runtime/src/content_encoding.rs index e16bd2cf0d..cabac80e2d 100644 --- a/aws/rust-runtime/aws-runtime/src/content_encoding.rs +++ b/aws/rust-runtime/aws-runtime/src/content_encoding.rs @@ -5,7 +5,6 @@ use bytes::{Bytes, BytesMut}; use http_02x::{HeaderMap, HeaderValue}; -use http_body_04x::{Body, SizeHint}; use pin_project_lite::pin_project; use std::pin::Pin; @@ -197,9 +196,9 @@ fn total_rendered_length_of_trailers(trailer_map: Option<&HeaderMap>) -> u64 { } } -impl Body for AwsChunkedBody +impl http_body_04x::Body for AwsChunkedBody where - Inner: Body, + Inner: http_body_04x::Body, { type Data = Bytes; type Error = aws_smithy_types::body::Error; @@ -296,8 +295,8 @@ where self.state == AwsChunkedBodyState::Closed } - fn size_hint(&self) -> SizeHint { - SizeHint::with_exact(self.encoded_length()) + fn size_hint(&self) -> http_body_04x::SizeHint { + http_body_04x::SizeHint::with_exact(self.encoded_length()) } } @@ -380,7 +379,7 @@ mod tests { } } - impl Body for SputteringBody { + impl http_body_04x::Body for SputteringBody { type Data = Bytes; type Error = aws_smithy_types::body::Error; diff --git a/aws/rust-runtime/aws-runtime/src/lib.rs b/aws/rust-runtime/aws-runtime/src/lib.rs index 3030866953..594bc6cc30 100644 --- a/aws/rust-runtime/aws-runtime/src/lib.rs +++ b/aws/rust-runtime/aws-runtime/src/lib.rs @@ -20,7 +20,7 @@ pub mod auth; /// AWS-specific content-encoding tools -#[cfg(feature = "http-02x")] +#[cfg(any(feature = "http-02x", feature = "http-1x"))] pub mod content_encoding; /// Supporting code for recursion detection in the AWS SDK. diff --git a/aws/rust-runtime/aws-sigv4/Cargo.toml b/aws/rust-runtime/aws-sigv4/Cargo.toml index 0d247d5436..1948e0276d 100644 --- a/aws/rust-runtime/aws-sigv4/Cargo.toml +++ b/aws/rust-runtime/aws-sigv4/Cargo.toml @@ -10,9 +10,9 @@ repository = "https://github.com/smithy-lang/smithy-rs" [features] default = ["sign-http", "http1"] -http0-compat = ["dep:http0"] -http1 = ["dep:http"] -sign-http = ["dep:http0", "dep:percent-encoding", "dep:form_urlencoded"] +http0-compat = ["dep:http-02x", "aws-smithy-runtime-api/http-02x"] +http1 = ["dep:http-1x"] +sign-http = ["dep:http-1x", "dep:percent-encoding", "dep:form_urlencoded"] sign-eventstream = ["dep:aws-smithy-eventstream"] sigv4a = ["dep:p256", "dep:crypto-bigint", "dep:subtle", "dep:zeroize", "dep:ring"] @@ -26,8 +26,8 @@ bytes = "1" form_urlencoded = { version = "1.0", optional = true } hex = "0.4" hmac = "0.12" -http0 = { version = "0.2", optional = true, package = "http" } -http = { version = "1", optional = true } +http-02x = { package = "http", version = "0.2", optional = true } +http-1x = { package = "http", version = "1", optional = true } once_cell = "1.8" p256 = { version = "0.11", features = ["ecdsa"], optional = true } percent-encoding = { version = "2.1", optional = true } diff --git a/aws/rust-runtime/aws-sigv4/src/http_request.rs b/aws/rust-runtime/aws-sigv4/src/http_request.rs index 2bd0c92903..3e695f8cf0 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request.rs @@ -10,6 +10,7 @@ //! **Note**: This requires `http0-compat` to be enabled. //! //! ```rust +//! # use http_1x as http; //! # use aws_credential_types::Credentials; //! use aws_smithy_runtime_api::client::identity::Identity; //! # use aws_sigv4::http_request::SignableBody; @@ -17,7 +18,6 @@ //! fn test() -> Result<(), aws_sigv4::http_request::SigningError> { //! use aws_sigv4::http_request::{sign, SigningSettings, SigningParams, SignableRequest}; //! use aws_sigv4::sign::v4; -//! use http0; //! use std::time::SystemTime; //! //! // Set up information and settings for the signing diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs b/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs index 03404276d9..bccb5936ad 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs @@ -15,8 +15,8 @@ use crate::http_request::{PercentEncodingMode, SigningSettings}; use crate::sign::v4::sha256_hex_string; use crate::SignatureVersion; use aws_smithy_http::query_writer::QueryWriter; -use http0::header::{AsHeaderName, HeaderName, HOST}; -use http0::{HeaderMap, HeaderValue, Uri}; +use http_1x::header::{AsHeaderName, HeaderName, HOST}; +use http_1x::{HeaderMap, HeaderValue, Uri}; use std::borrow::Cow; use std::cmp::Ordering; use std::fmt; @@ -640,7 +640,7 @@ mod tests { use aws_credential_types::Credentials; use aws_smithy_http::query_writer::QueryWriter; use aws_smithy_runtime_api::client::identity::Identity; - use http0::{HeaderValue, Uri}; + use http_1x::{HeaderValue, Uri}; use pretty_assertions::assert_eq; use proptest::{prelude::*, proptest}; use std::borrow::Cow; @@ -808,7 +808,7 @@ mod tests { #[test] fn test_tilde_in_uri() { - let req = http0::Request::builder() + let req = http_1x::Request::builder() .uri("https://s3.us-east-1.amazonaws.com/my-bucket?list-type=2&prefix=~objprefix&single&k=&unreserved=-_.~").body("").unwrap().into(); let req = SignableRequest::from(&req); let identity = Credentials::for_tests().into(); @@ -829,7 +829,7 @@ mod tests { query_writer.insert("list-type", "2"); query_writer.insert("prefix", &all_printable_ascii_chars); - let req = http0::Request::builder() + let req = http_1x::Request::builder() .uri(query_writer.build_uri()) .body("") .unwrap() @@ -877,7 +877,7 @@ mod tests { // It should exclude authorization, user-agent, x-amzn-trace-id headers from presigning #[test] fn non_presigning_header_exclusion() { - let request = http0::Request::builder() + let request = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("authorization", "test-authorization") .header("content-type", "application/xml") @@ -909,7 +909,7 @@ mod tests { // It should exclude authorization, user-agent, x-amz-user-agent, x-amzn-trace-id headers from presigning #[test] fn presigning_header_exclusion() { - let request = http0::Request::builder() + let request = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("authorization", "test-authorization") .header("content-type", "application/xml") @@ -958,7 +958,7 @@ mod tests { valid_input, ) ) { - let mut request_builder = http0::Request::builder() + let mut request_builder = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("content-type", "application/xml") .header("content-length", "0"); diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/error.rs b/aws/rust-runtime/aws-sigv4/src/http_request/error.rs index 6f53783ff8..4623f98129 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/error.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/error.rs @@ -3,8 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -use http0::header::{InvalidHeaderName, InvalidHeaderValue}; -use http0::uri::InvalidUri; +use http_1x::header::{InvalidHeaderName, InvalidHeaderValue}; +use http_1x::uri::InvalidUri; use std::error::Error; use std::fmt; diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/settings.rs b/aws/rust-runtime/aws-sigv4/src/http_request/settings.rs index bc8409b807..042abf5d1e 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/settings.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/settings.rs @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -use http0::header::{AUTHORIZATION, USER_AGENT}; +use http_1x::header::{AUTHORIZATION, USER_AGENT}; use std::borrow::Cow; use std::time::Duration; diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs index 414570791d..c4dae432a0 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs @@ -14,7 +14,7 @@ use crate::sign::v4; #[cfg(feature = "sigv4a")] use crate::sign::v4a; use crate::{SignatureVersion, SigningOutput}; -use http0::Uri; +use http_1x::Uri; use std::borrow::Cow; use std::fmt::{Debug, Formatter}; use std::str; @@ -169,48 +169,48 @@ impl SigningInstructions { #[cfg(any(feature = "http0-compat", test))] /// Applies the instructions to the given `request`. - pub fn apply_to_request_http0x(self, request: &mut http0::Request) { + pub fn apply_to_request_http0x(self, request: &mut http_02x::Request) { let (new_headers, new_query) = self.into_parts(); for header in new_headers.into_iter() { - let mut value = http0::HeaderValue::from_str(&header.value).unwrap(); + let mut value = http_02x::HeaderValue::from_str(&header.value).unwrap(); value.set_sensitive(header.sensitive); request.headers_mut().insert(header.key, value); } if !new_query.is_empty() { - let mut query = aws_smithy_http::query_writer::QueryWriter::new(request.uri()); + let mut query = aws_smithy_http::query_writer::QueryWriter::new_from_string( + &request.uri().to_string(), + ) + .expect("unreachable: URI is valid"); for (name, value) in new_query { query.insert(name, &value); } - *request.uri_mut() = query.build_uri(); + *request.uri_mut() = query + .build_uri() + .to_string() + .parse() + .expect("unreachable: URI is valid"); } } #[cfg(any(feature = "http1", test))] /// Applies the instructions to the given `request`. - pub fn apply_to_request_http1x(self, request: &mut http::Request) { + pub fn apply_to_request_http1x(self, request: &mut http_1x::Request) { // TODO(https://github.com/smithy-lang/smithy-rs/issues/3367): Update query writer to reduce // allocations let (new_headers, new_query) = self.into_parts(); for header in new_headers.into_iter() { - let mut value = http::HeaderValue::from_str(&header.value).unwrap(); + let mut value = http_1x::HeaderValue::from_str(&header.value).unwrap(); value.set_sensitive(header.sensitive); request.headers_mut().insert(header.key, value); } if !new_query.is_empty() { - let mut query = aws_smithy_http::query_writer::QueryWriter::new_from_string( - &request.uri().to_string(), - ) - .expect("unreachable: URI is valid"); + let mut query = aws_smithy_http::query_writer::QueryWriter::new(&request.uri()); for (name, value) in new_query { query.insert(name, &value); } - *request.uri_mut() = query - .build_uri() - .to_string() - .parse() - .expect("unreachable: URI is valid"); + *request.uri_mut() = query.build_uri(); } } } @@ -485,7 +485,7 @@ mod tests { }; use crate::sign::v4; use aws_credential_types::Credentials; - use http0::{HeaderValue, Request}; + use http_1x::{HeaderValue, Request}; use pretty_assertions::assert_eq; use proptest::proptest; use std::borrow::Cow; @@ -533,7 +533,7 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http0x(&mut signed); + out.output.apply_to_request_http1x(&mut signed); let expected = test::v4::test_signed_request("get-vanilla-query-order-key-case"); assert_req_eq!(expected, signed); @@ -589,7 +589,7 @@ mod tests { let out = sign(signable_req, ¶ms).unwrap(); // Sigv4a signatures are non-deterministic, so we can't compare the signature directly. out.output - .apply_to_request_http0x(&mut req.as_http_request()); + .apply_to_request_http1x(&mut req.as_http_request()); let creds = params.credentials().unwrap(); let signing_key = @@ -819,7 +819,7 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http0x(&mut signed); + out.output.apply_to_request_http1x(&mut signed); let expected = test::v4::test_signed_request(test); assert_req_eq!(expected, signed); @@ -851,7 +851,7 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http0x(&mut signed); + out.output.apply_to_request_http1x(&mut signed); let expected = test::v4::test_signed_request_query_params("get-vanilla-query-order-key-case"); @@ -871,7 +871,7 @@ mod tests { } .into(); - let original = http0::Request::builder() + let original = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("some-header", HeaderValue::from_str("テスト").unwrap()) .body("") @@ -885,9 +885,9 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http0x(&mut signed); + out.output.apply_to_request_http1x(&mut signed); - let expected = http0::Request::builder() + let expected = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("some-header", HeaderValue::from_str("テスト").unwrap()) .header( @@ -925,7 +925,7 @@ mod tests { } .into(); - let original = http0::Request::builder() + let original = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .body("") .unwrap() @@ -946,9 +946,9 @@ mod tests { let mut signed = original.as_http_request(); out_with_session_token_but_excluded .output - .apply_to_request_http0x(&mut signed); + .apply_to_request_http1x(&mut signed); - let expected = http0::Request::builder() + let expected = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header( "x-amz-date", @@ -986,7 +986,7 @@ mod tests { } .into(); - let original = http0::Request::builder() + let original = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header( "some-header", @@ -1003,9 +1003,9 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http0x(&mut signed); + out.output.apply_to_request_http1x(&mut signed); - let expected = http0::Request::builder() + let expected = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header( "some-header", @@ -1068,12 +1068,12 @@ mod tests { add_header(&mut headers, "some-other-header", "bar", false); let instructions = SigningInstructions::new(headers, vec![]); - let mut request = http0::Request::builder() + let mut request = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .body("") .unwrap(); - instructions.apply_to_request_http0x(&mut request); + instructions.apply_to_request_http1x(&mut request); let get_header = |n: &str| request.headers().get(n).unwrap().to_str().unwrap(); assert_eq!("foo", get_header("some-header")); @@ -1088,12 +1088,12 @@ mod tests { ]; let instructions = SigningInstructions::new(vec![], params); - let mut request = http0::Request::builder() + let mut request = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com/some/path") .body("") .unwrap(); - instructions.apply_to_request_http0x(&mut request); + instructions.apply_to_request_http1x(&mut request); assert_eq!( "/some/path?some-param=f%26o%3Fo&some-other-param%3F=bar", @@ -1109,7 +1109,7 @@ mod tests { ]; let instructions = SigningInstructions::new(vec![], params); - let mut request = http::Request::builder() + let mut request = http_1x::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com/some/path") .body("") .unwrap(); diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/test.rs b/aws/rust-runtime/aws-sigv4/src/http_request/test.rs index be6c496462..c11cdf8197 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/test.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/test.rs @@ -6,7 +6,7 @@ //! Functions shared between the tests of several modules. use crate::http_request::{SignableBody, SignableRequest}; -use http0::{Method, Uri}; +use http_1x::{Method, Uri}; use std::error::Error as StdError; pub(crate) mod v4 { @@ -258,8 +258,8 @@ impl TestRequest { self.body = TestSignedBody::Signable(body); } - pub(crate) fn as_http_request(&self) -> http0::Request<&'static str> { - let mut builder = http0::Request::builder() + pub(crate) fn as_http_request(&self) -> http_1x::Request<&'static str> { + let mut builder = http_1x::Request::builder() .uri(&self.uri) .method(Method::from_bytes(self.method.as_bytes()).unwrap()); for (k, v) in &self.headers { @@ -269,8 +269,8 @@ impl TestRequest { } } -impl> From> for TestRequest { - fn from(value: http0::Request) -> Self { +impl> From> for TestRequest { + fn from(value: http_1x::Request) -> Self { let invalid = value .headers() .values() diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index aa579bd081..5643f268d5 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -337,7 +337,7 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.60.13" +version = "0.70.0" dependencies = [ "aws-smithy-http 0.70.0", "aws-smithy-types 1.2.8", @@ -346,8 +346,9 @@ dependencies = [ "crc32c", "crc32fast", "hex", - "http 0.2.12", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "md-5", "pin-project-lite", "pretty_assertions", @@ -446,6 +447,7 @@ dependencies = [ "http 0.2.12", "http 1.1.0", "http-body 0.4.6", + "http-body 1.0.1", "hyper 0.14.31", "once_cell", "percent-encoding", @@ -2011,7 +2013,7 @@ dependencies = [ "bytes", "fastrand", "futures-util", - "http 0.2.12", + "http 1.1.0", "http-body 0.4.6", "md-5", "once_cell", diff --git a/rust-runtime/aws-smithy-checksums/Cargo.toml b/rust-runtime/aws-smithy-checksums/Cargo.toml index 0888246992..2f8ebc3d00 100644 --- a/rust-runtime/aws-smithy-checksums/Cargo.toml +++ b/rust-runtime/aws-smithy-checksums/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-checksums" -version = "0.60.13" +version = "0.70.0" authors = [ "AWS Rust SDK Team ", "Zelda Hessler ", @@ -14,13 +14,13 @@ repository = "https://github.com/smithy-lang/smithy-rs" [dependencies] aws-smithy-http = { path = "../aws-smithy-http" } -aws-smithy-types = { path = "../aws-smithy-types" } +aws-smithy-types = { path = "../aws-smithy-types", features = ["http-body-1-x"] } bytes = "1" crc32c = "0.6.8" crc32fast = "1.3" hex = "0.4.3" -http = "0.2.8" -http-body = "0.4.4" +http = "1" +http-body = "1" md-5 = "0.10" pin-project-lite = "0.2.9" sha1 = "0.10" @@ -29,6 +29,7 @@ tracing = "0.1" [dev-dependencies] bytes-utils = "0.1.2" +http-body-util = "0.1.2" pretty_assertions = "1.3" tokio = { version = "1.23.1", features = ["macros", "rt"] } tracing-test = "0.2.1" diff --git a/rust-runtime/aws-smithy-checksums/src/body/calculate.rs b/rust-runtime/aws-smithy-checksums/src/body/calculate.rs index a1f6c25a19..f31fe32c3a 100644 --- a/rust-runtime/aws-smithy-checksums/src/body/calculate.rs +++ b/rust-runtime/aws-smithy-checksums/src/body/calculate.rs @@ -10,8 +10,7 @@ use crate::http::HttpChecksum; use aws_smithy_http::header::append_merge_header_maps; use aws_smithy_types::body::SdkBody; -use http::HeaderMap; -use http_body::SizeHint; +use http_body::{Frame, SizeHint}; use pin_project_lite::pin_project; use std::pin::Pin; @@ -40,48 +39,44 @@ impl http_body::Body for ChecksumBody { type Data = bytes::Bytes; type Error = aws_smithy_types::body::Error; - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { let this = self.project(); - match this.checksum { - Some(checksum) => { - let poll_res = this.body.poll_data(cx); - if let Poll::Ready(Some(Ok(data))) = &poll_res { - checksum.update(data); - } - poll_res + match this.body.poll_frame(cx) { + Poll::Ready(Some(Ok(frame))) if frame.is_data() => { + let data = frame.into_data().expect("unreachable"); + match this.checksum { + Some(checksum) => { + checksum.update(&data); + Poll::Ready(Some(Ok(Frame::data(data)))) + } + None => unreachable!("This can only fail if poll_data is called again after poll_trailers, which is invalid"), + } } - None => unreachable!("This can only fail if poll_data is called again after poll_trailers, which is invalid"), - } - } - - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - let this = self.project(); - let poll_res = this.body.poll_trailers(cx); - - if let Poll::Ready(Ok(maybe_inner_trailers)) = poll_res { - let checksum_headers = if let Some(checksum) = this.checksum.take() { - checksum.headers() - } else { - return Poll::Ready(Ok(None)); - }; - - return match maybe_inner_trailers { - Some(inner_trailers) => Poll::Ready(Ok(Some(append_merge_header_maps( - inner_trailers, - checksum_headers, - )))), - None => Poll::Ready(Ok(Some(checksum_headers))), - }; + Poll::Ready(Some(Ok(non_data_frame))) => match non_data_frame.into_trailers() { + Ok(inner_trailers) => { + if let Some(checksum) = this.checksum.take() { + let merged = append_merge_header_maps(inner_trailers, checksum.headers()); + Poll::Ready(Some(Ok(Frame::trailers(merged)))) + } else { + Poll::Ready(Some(Ok(Frame::trailers(inner_trailers)))) + } + } + Err(non_trailer_frame) => Poll::Ready(Some(Ok(non_trailer_frame))), + }, + Poll::Ready(None) => { + if let Some(checksum) = this.checksum.take() { + Poll::Ready(Some(Ok(Frame::trailers(checksum.headers())))) + } else { + Poll::Ready(None) + } + } + Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))), + Poll::Pending => Poll::Pending, } - - poll_res } fn is_end_stream(&self) -> bool { @@ -102,8 +97,6 @@ mod tests { use aws_smithy_types::base64; use aws_smithy_types::body::SdkBody; use bytes::Buf; - use bytes_utils::SegmentedBuf; - use http_body::Body; use std::fmt::Write; use std::io::Read; @@ -121,32 +114,18 @@ mod tests { #[tokio::test] async fn test_checksum_body() { + use http_body_util::BodyExt; let input_text = "This is some test text for an SdkBody"; let body = SdkBody::from(input_text); let checksum = CRC_32_NAME .parse::() .unwrap() .into_impl(); - let mut body = ChecksumBody::new(body, checksum); + let body = ChecksumBody::new(body, checksum); - let mut output = SegmentedBuf::new(); - while let Some(buf) = body.data().await { - output.push(buf.unwrap()); - } + let collected = body.collect().await.expect("body and trailers valid"); - let mut output_text = String::new(); - output - .reader() - .read_to_string(&mut output_text) - .expect("Doesn't cause IO errors"); - // Verify data is complete and unaltered - assert_eq!(input_text, output_text); - - let trailers = body - .trailers() - .await - .expect("checksum generation was without error") - .expect("trailers were set"); + let trailers = collected.trailers().expect("trailers were set").to_owned(); let checksum_trailer = trailers .get(CRC_32_HEADER_NAME) .expect("trailers contain crc32 checksum"); @@ -154,5 +133,14 @@ mod tests { // Known correct checksum for the input "This is some test text for an SdkBody" assert_eq!("0x99B01F72", checksum_trailer); + + let mut output_text = String::new(); + collected + .to_bytes() + .reader() + .read_to_string(&mut output_text) + .expect("Doesn't cause IO errors"); + // Verify data is complete and unaltered + assert_eq!(input_text, output_text); } } diff --git a/rust-runtime/aws-smithy-checksums/src/body/validate.rs b/rust-runtime/aws-smithy-checksums/src/body/validate.rs index cf15815772..c76ddab5b2 100644 --- a/rust-runtime/aws-smithy-checksums/src/body/validate.rs +++ b/rust-runtime/aws-smithy-checksums/src/body/validate.rs @@ -11,8 +11,7 @@ use crate::http::HttpChecksum; use aws_smithy_types::body::SdkBody; use bytes::Bytes; -use http::{HeaderMap, HeaderValue}; -use http_body::SizeHint; +use http_body::{Body, Frame, SizeHint}; use pin_project_lite::pin_project; use std::fmt::Display; @@ -48,14 +47,13 @@ impl ChecksumBody { fn poll_inner( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { - use http_body::Body; - + ) -> Poll, aws_smithy_types::body::Error>>> { let this = self.project(); let checksum = this.checksum; - match this.inner.poll_data(cx) { - Poll::Ready(Some(Ok(data))) => { + match this.inner.poll_frame(cx) { + Poll::Ready(Some(Ok(frame))) if frame.is_data() => { + let data = frame.into_data().expect("unreachable"); tracing::trace!( "reading {} bytes from the body and updating the checksum calculation", data.len() @@ -68,8 +66,9 @@ impl ChecksumBody { }; checksum.update(&data); - Poll::Ready(Some(Ok(data))) + Poll::Ready(Some(Ok(Frame::data(data)))) } + Poll::Ready(Some(Ok(non_data_frame))) => Poll::Ready(Some(Ok(non_data_frame))), // Once the inner body has stopped returning data, check the checksum // and return an error if it doesn't match. Poll::Ready(None) => { @@ -128,20 +127,13 @@ impl http_body::Body for ChecksumBody { type Data = Bytes; type Error = aws_smithy_types::body::Error; - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { self.poll_inner(cx) } - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll>, Self::Error>> { - self.project().inner.poll_trailers(cx) - } - fn is_end_stream(&self) -> bool { self.checksum.is_none() } @@ -158,7 +150,7 @@ mod tests { use aws_smithy_types::body::SdkBody; use bytes::{Buf, Bytes}; use bytes_utils::SegmentedBuf; - use http_body::Body; + use http_body_util::BodyExt; use std::io::Read; fn calculate_crc32_checksum(input: &str) -> Bytes { @@ -178,8 +170,8 @@ mod tests { non_matching_checksum.clone(), ); - while let Some(data) = body.data().await { - match data { + while let Some(frame) = body.frame().await { + match frame { Ok(_) => { /* Do nothing */ } Err(e) => { match e.downcast_ref::().unwrap() { @@ -206,8 +198,12 @@ mod tests { let mut body = ChecksumBody::new(body, http_checksum, actual_checksum); let mut output = SegmentedBuf::new(); - while let Some(buf) = body.data().await { - output.push(buf.unwrap()); + while let Some(frame) = body.frame().await { + let data = frame + .expect("frame expected") + .into_data() + .expect("only data frames"); + output.push(data); } let mut output_text = String::new(); diff --git a/rust-runtime/aws-smithy-http/Cargo.toml b/rust-runtime/aws-smithy-http/Cargo.toml index 7cea34f365..308718ef8f 100644 --- a/rust-runtime/aws-smithy-http/Cargo.toml +++ b/rust-runtime/aws-smithy-http/Cargo.toml @@ -13,17 +13,19 @@ repository = "https://github.com/smithy-lang/smithy-rs" [features] event-stream = ["aws-smithy-eventstream"] rt-tokio = ["aws-smithy-types/rt-tokio"] +compat = ["dep:http-02x"] [dependencies] aws-smithy-eventstream = { path = "../aws-smithy-eventstream", optional = true } -aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["client", "http-02x"] } +aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["client", "http-1x"] } aws-smithy-types = { path = "../aws-smithy-types", features = ["byte-stream-poll-next", "http-body-0-4-x"] } bytes = "1" bytes-utils = "0.1" -# TODO(hyper1) - we've bumped to 0.70.x from 0.60.x (semver major). Complete the breaking changes by updating to http 1.x ecosystem fully in this crate. Also remove hyper 0.14 from dev -http-02x = { package = "http", version = "0.2.3" } http-1x = { package = "http", version = "1" } +http-02x = { package = "http", version = "0.2.9", optional = true } +# TODO(hyper1) - remove in favor of http-body-1x with breaking 0.70 change http-body-04x = { package = "http-body", version = "0.4.4" } +http-body-1x = { package = "http-body", version = "1" } once_cell = "1.10" percent-encoding = "2.1.0" pin-project-lite = "0.2.9" diff --git a/rust-runtime/aws-smithy-http/src/compat.rs b/rust-runtime/aws-smithy-http/src/compat.rs new file mode 100644 index 0000000000..8b098fd794 --- /dev/null +++ b/rust-runtime/aws-smithy-http/src/compat.rs @@ -0,0 +1,206 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +use core::task::ready; +use pin_project_lite::pin_project; +use std::pin::Pin; +use std::task::Context; +use std::task::Poll; + +pin_project! { + /// http-0.4.x to http-1.x body conversion util. This is meant for internal use only and may be + /// removed in the future. + pub struct Http04toHttp1x { + #[pin] + inner: B, + state: State, + } +} + +enum State { + PollData, + PollTrailers, + Done, +} + +impl Http04toHttp1x { + /// Create a new shim to convert http-0.4.x body to an http-1.x body. + pub fn new(inner: B) -> Self { + Self { + inner, + state: State::PollData, + } + } +} + +impl http_body_1x::Body for Http04toHttp1x +where + B: http_body_04x::Body, +{ + type Data = B::Data; + type Error = B::Error; + + fn poll_frame( + self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + ) -> std::task::Poll, Self::Error>>> { + let mut this = self.project(); + + loop { + match this.state { + State::PollData => match ready!(this.inner.as_mut().poll_data(cx)) { + Some(data) => return Poll::Ready(Some(data.map(http_body_1x::Frame::data))), + None => *this.state = State::PollTrailers, + }, + State::PollTrailers => { + let result = match ready!(this.inner.as_mut().poll_trailers(cx)) { + Ok(trailers) => Poll::Ready( + trailers + .map(convert_headers_0x_1x) + .map(http_body_1x::Frame::::trailers) + .map(Result::Ok), + ), + Err(err) => Poll::Ready(Some(Err(err))), + }; + + *this.state = State::Done; + return result; + } + State::Done => return Poll::Ready(None), + } + } + } + + fn is_end_stream(&self) -> bool { + self.inner.is_end_stream() + } + + fn size_hint(&self) -> http_body_1x::SizeHint { + let mut size_hint = http_body_1x::SizeHint::new(); + let inner_hint = self.inner.size_hint(); + if let Some(exact) = inner_hint.exact() { + size_hint.set_exact(exact) + } else { + size_hint.set_lower(inner_hint.lower()); + if let Some(upper) = inner_hint.upper() { + size_hint.set_upper(upper); + } + } + size_hint + } +} + +pub fn convert_headers_0x_1x(input: http_02x::HeaderMap) -> http_1x::HeaderMap { + let mut map = http_1x::HeaderMap::with_capacity(input.capacity()); + let mut mem: Option = None; + for (k, v) in input.into_iter() { + let name = k.or_else(|| mem.clone()).unwrap(); + map.append( + http_1x::HeaderName::from_bytes(name.as_str().as_bytes()).expect("already validated"), + http_1x::HeaderValue::from_bytes(v.as_bytes()).expect("already validated"), + ); + mem = Some(name); + } + map +} + +pin_project! { + /// http-1.x to http-0.4.x body conversion util. This is meant for internal use only and may be + /// removed in the future. + pub struct Http1toHttp04 { + #[pin] + inner: B, + trailers: Option, + } +} + +impl Http1toHttp04 { + /// Create a new shim to convert http-1.x body to an http-0.4.x body. + pub fn new(inner: B) -> Self { + Self { + inner, + trailers: None, + } + } +} + +impl http_body_04x::Body for Http1toHttp04 +where + B: http_body_1x::Body, +{ + type Data = B::Data; + type Error = B::Error; + + fn poll_data( + mut self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>> { + loop { + let this = self.as_mut().project(); + match ready!(this.inner.poll_frame(cx)) { + Some(Ok(frame)) => { + let frame = match frame.into_data() { + Ok(data) => return Poll::Ready(Some(Ok(data))), + Err(frame) => frame, + }; + // when we get a trailers frame, store the trailers for the next poll + if let Ok(trailers) = frame.into_trailers() { + this.trailers.replace(trailers); + return Poll::Ready(None); + }; + // if the frame type was unknown, discard it. the next one might be something + // useful + } + Some(Err(e)) => return Poll::Ready(Some(Err(e))), + None => return Poll::Ready(None), + } + } + } + + fn poll_trailers( + self: Pin<&mut Self>, + _cx: &mut Context<'_>, + ) -> Poll, Self::Error>> { + // all of the polling happens in poll_data, once we get to the trailers we've actually + // already read everything + let this = self.project(); + match this.trailers.take() { + Some(headers) => Poll::Ready(Ok(Some(convert_headers_1x_0x(headers)))), + None => Poll::Ready(Ok(None)), + } + } + + fn is_end_stream(&self) -> bool { + self.inner.is_end_stream() + } + + fn size_hint(&self) -> http_body_04x::SizeHint { + let mut size_hint = http_body_04x::SizeHint::new(); + let inner_hint = self.inner.size_hint(); + if let Some(exact) = inner_hint.exact() { + size_hint.set_exact(exact); + } else { + size_hint.set_lower(inner_hint.lower()); + if let Some(upper) = inner_hint.upper() { + size_hint.set_upper(upper); + } + } + size_hint + } +} + +pub fn convert_headers_1x_0x(input: http_1x::HeaderMap) -> http_02x::HeaderMap { + let mut map = http_02x::HeaderMap::with_capacity(input.capacity()); + let mut mem: Option = None; + for (k, v) in input.into_iter() { + let name = k.or_else(|| mem.clone()).unwrap(); + map.append( + http_02x::HeaderName::from_bytes(name.as_str().as_bytes()).expect("already validated"), + http_02x::HeaderValue::from_bytes(v.as_bytes()).expect("already validated"), + ); + mem = Some(name); + } + map +} diff --git a/rust-runtime/aws-smithy-http/src/header.rs b/rust-runtime/aws-smithy-http/src/header.rs index 4519bf490f..bcc62788e6 100644 --- a/rust-runtime/aws-smithy-http/src/header.rs +++ b/rust-runtime/aws-smithy-http/src/header.rs @@ -8,7 +8,7 @@ use aws_smithy_types::date_time::Format; use aws_smithy_types::primitive::Parse; use aws_smithy_types::DateTime; -use http_02x::header::{HeaderMap, HeaderName, HeaderValue}; +use http_1x::header::{HeaderMap, HeaderName, HeaderValue}; use std::borrow::Cow; use std::error::Error; use std::fmt; @@ -151,13 +151,13 @@ where /// Given an HTTP request, set a request header if that header was not already set. pub fn set_request_header_if_absent( - request: http_02x::request::Builder, + request: http_1x::request::Builder, key: HeaderName, value: V, -) -> http_02x::request::Builder +) -> http_1x::request::Builder where HeaderValue: TryFrom, - >::Error: Into, + >::Error: Into, { if !request .headers_ref() @@ -172,13 +172,13 @@ where /// Given an HTTP response, set a response header if that header was not already set. pub fn set_response_header_if_absent( - response: http_02x::response::Builder, + response: http_1x::response::Builder, key: HeaderName, value: V, -) -> http_02x::response::Builder +) -> http_1x::response::Builder where HeaderValue: TryFrom, - >::Error: Into, + >::Error: Into, { if !response .headers_ref() @@ -340,12 +340,12 @@ mod test { use aws_smithy_runtime_api::http::Request; use aws_smithy_types::error::display::DisplayErrorContext; use aws_smithy_types::{date_time::Format, DateTime}; - use http_02x::header::{HeaderMap, HeaderName, HeaderValue}; + use http_1x::header::{HeaderMap, HeaderName, HeaderValue}; use std::collections::HashMap; #[test] fn put_on_request_if_absent() { - let builder = http_02x::Request::builder().header("foo", "bar"); + let builder = http_1x::Request::builder().header("foo", "bar"); let builder = set_request_header_if_absent(builder, HeaderName::from_static("foo"), "baz"); let builder = set_request_header_if_absent(builder, HeaderName::from_static("other"), "value"); @@ -362,7 +362,7 @@ mod test { #[test] fn put_on_response_if_absent() { - let builder = http_02x::Response::builder().header("foo", "bar"); + let builder = http_1x::Response::builder().header("foo", "bar"); let builder = set_response_header_if_absent(builder, HeaderName::from_static("foo"), "baz"); let builder = set_response_header_if_absent(builder, HeaderName::from_static("other"), "value"); @@ -383,7 +383,7 @@ mod test { #[test] fn parse_floats() { - let test_request = http_02x::Request::builder() + let test_request = http_1x::Request::builder() .header("X-Float-Multi", "0.0,Infinity,-Infinity,5555.5") .header("X-Float-Error", "notafloat") .body(()) @@ -421,7 +421,7 @@ mod test { #[test] fn test_many_dates() { - let test_request = http_02x::Request::builder() + let test_request = http_1x::Request::builder() .header("Empty", "") .header("SingleHttpDate", "Wed, 21 Oct 2015 07:28:00 GMT") .header( @@ -473,7 +473,7 @@ mod test { #[test] fn read_many_strings() { - let test_request = http_02x::Request::builder() + let test_request = http_1x::Request::builder() .header("Empty", "") .header("Foo", " foo") .header("FooTrailing", "foo ") @@ -524,7 +524,7 @@ mod test { #[test] fn read_many_bools() { - let test_request = http_02x::Request::builder() + let test_request = http_1x::Request::builder() .header("X-Bool-Multi", "true,false") .header("X-Bool-Multi", "true") .header("X-Bool", "true") @@ -590,7 +590,7 @@ mod test { #[test] fn check_read_many_i16() { - let test_request = http_02x::Request::builder() + let test_request = http_1x::Request::builder() .header("X-Multi", "123,456") .header("X-Multi", "789") .header("X-Num", "777") @@ -657,7 +657,7 @@ mod test { #[test] fn test_prefix_headers() { let test_request = Request::try_from( - http_02x::Request::builder() + http_1x::Request::builder() .header("X-Prefix-A", "123,456") .header("X-Prefix-B", "789") .header("X-Prefix-C", "777") diff --git a/rust-runtime/aws-smithy-http/src/label.rs b/rust-runtime/aws-smithy-http/src/label.rs index 5d24fca442..720b812c5c 100644 --- a/rust-runtime/aws-smithy-http/src/label.rs +++ b/rust-runtime/aws-smithy-http/src/label.rs @@ -41,7 +41,7 @@ pub fn fmt_timestamp(t: &DateTime, format: Format) -> Result Writer<'a> { #[cfg(test)] mod test { use crate::query::{fmt_string, Writer}; - use http_02x::Uri; + use http_1x::Uri; use proptest::proptest; #[test] diff --git a/rust-runtime/aws-smithy-http/src/query_writer.rs b/rust-runtime/aws-smithy-http/src/query_writer.rs index fef41d0830..d04decb72b 100644 --- a/rust-runtime/aws-smithy-http/src/query_writer.rs +++ b/rust-runtime/aws-smithy-http/src/query_writer.rs @@ -4,8 +4,8 @@ */ use crate::query::fmt_string as percent_encode_query; -use http_02x::uri::InvalidUri; -use http_02x::Uri; +use http_1x::uri::InvalidUri; +use http_1x::Uri; /// Utility for updating the query string in a [`Uri`]. #[allow(missing_debug_implementations)] @@ -82,7 +82,7 @@ impl QueryWriter { #[cfg(test)] mod test { use super::QueryWriter; - use http_02x::Uri; + use http_1x::Uri; #[test] fn empty_uri() { diff --git a/rust-runtime/aws-smithy-runtime-api/src/http/request.rs b/rust-runtime/aws-smithy-runtime-api/src/http/request.rs index 701abbfce3..eaf0105d45 100644 --- a/rust-runtime/aws-smithy-runtime-api/src/http/request.rs +++ b/rust-runtime/aws-smithy-runtime-api/src/http/request.rs @@ -195,6 +195,13 @@ impl TryInto> for Request { } } +#[cfg(feature = "http-1x")] +impl From for Uri { + fn from(value: http_1x::Uri) -> Self { + Uri::from_http1x_uri(value) + } +} + impl Request { /// Converts this request into an http 0.x request. /// diff --git a/rust-runtime/aws-smithy-runtime/Cargo.toml b/rust-runtime/aws-smithy-runtime/Cargo.toml index cfab3977ac..38ad79822b 100644 --- a/rust-runtime/aws-smithy-runtime/Cargo.toml +++ b/rust-runtime/aws-smithy-runtime/Cargo.toml @@ -31,7 +31,7 @@ wire-mock = ["test-util", "aws-smithy-http-client/wire-mock"] [dependencies] aws-smithy-async = { path = "../aws-smithy-async" } aws-smithy-http = { path = "../aws-smithy-http" } -aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api" } +aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["http-1x"] } aws-smithy-types = { path = "../aws-smithy-types", features = ["http-body-0-4-x"] } aws-smithy-http-client = { path = "../aws-smithy-http-client", optional = true } bytes = "1" diff --git a/rust-runtime/aws-smithy-types/src/body/http_body_1_x.rs b/rust-runtime/aws-smithy-types/src/body/http_body_1_x.rs index 2f777f4207..8a35e331ae 100644 --- a/rust-runtime/aws-smithy-types/src/body/http_body_1_x.rs +++ b/rust-runtime/aws-smithy-types/src/body/http_body_1_x.rs @@ -24,6 +24,8 @@ impl SdkBody { SdkBody::from_body_0_4_internal(Http1toHttp04::new(body.map_err(Into::into))) } + // FIXME(hyper1): this method name is confusing at best since it doesn't only return data + // frames pub(crate) fn poll_data_frame( mut self: Pin<&mut Self>, cx: &mut Context<'_>, diff --git a/rust-runtime/inlineable/Cargo.toml b/rust-runtime/inlineable/Cargo.toml index 2b39b25854..157c674a38 100644 --- a/rust-runtime/inlineable/Cargo.toml +++ b/rust-runtime/inlineable/Cargo.toml @@ -28,7 +28,7 @@ aws-smithy-xml = { path = "../aws-smithy-xml" } bytes = "1" fastrand = "2.0.0" futures-util = "0.3.29" -http = "0.2.1" +http = "1" http-body = "0.4" md-5 = "0.10.0" once_cell = "1.16.0" diff --git a/rust-runtime/inlineable/src/serialization_settings.rs b/rust-runtime/inlineable/src/serialization_settings.rs index a00e38e6b4..7a77f87b6b 100644 --- a/rust-runtime/inlineable/src/serialization_settings.rs +++ b/rust-runtime/inlineable/src/serialization_settings.rs @@ -7,7 +7,7 @@ use aws_smithy_http::header::set_request_header_if_absent; use aws_smithy_types::config_bag::{Storable, StoreReplace}; -use http::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE}; +use http_1x::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE}; /// Configuration for how default protocol headers are serialized #[derive(Clone, Debug, Default)] @@ -47,10 +47,10 @@ impl HeaderSerializationSettings { /// Sets a default header on the given request builder if it should be serialized pub(crate) fn set_default_header( &self, - mut request: http::request::Builder, + mut request: http_1x::request::Builder, header_name: HeaderName, value: &str, - ) -> http::request::Builder { + ) -> http_1x::request::Builder { if self.include_header(&header_name) { request = set_request_header_if_absent(request, header_name, value); } From 2948f986f0117e5dedd5e27d9489c30604250895 Mon Sep 17 00:00:00 2001 From: Aaron J Todd Date: Wed, 30 Oct 2024 11:30:09 -0400 Subject: [PATCH 05/11] wip fix inlineable and integration tests to work with codegen --- aws/rust-runtime/Cargo.lock | 4 +- aws/rust-runtime/aws-config/Cargo.lock | 2 +- aws/rust-runtime/aws-config/Cargo.toml | 2 +- aws/rust-runtime/aws-inlineable/Cargo.toml | 3 +- .../aws-inlineable/src/presigning.rs | 4 +- aws/rust-runtime/aws-runtime/Cargo.toml | 2 +- aws/rust-runtime/aws-sigv4/Cargo.toml | 2 +- .../smithy/rustsdk/AwsPresigningDecorator.kt | 2 +- .../rustsdk/HttpRequestChecksumDecorator.kt | 2 +- .../rustsdk/IntegrationTestDependencies.kt | 9 ++- .../customize/glacier/GlacierDecorator.kt | 1 + aws/sdk/integration-tests/dynamodb/Cargo.toml | 2 +- .../dynamodb/benches/deserialization_bench.rs | 4 +- .../dynamodb/tests/endpoints.rs | 2 +- .../dynamodb/tests/movies.rs | 64 +++++++++---------- .../dynamodb/tests/paginators.rs | 10 +-- .../retries-with-client-rate-limiting.rs | 16 ++--- .../dynamodb/tests/shared-config.rs | 2 +- aws/sdk/integration-tests/ec2/Cargo.toml | 2 +- .../integration-tests/ec2/tests/paginators.rs | 4 +- aws/sdk/integration-tests/glacier/Cargo.toml | 2 +- aws/sdk/integration-tests/iam/Cargo.toml | 2 +- aws/sdk/integration-tests/kms/Cargo.toml | 2 +- .../kms/tests/integration.rs | 26 ++++---- .../kms/tests/retryable_errors.rs | 6 +- aws/sdk/integration-tests/lambda/Cargo.toml | 2 +- .../tests/naughty-strings-client-context.rs | 2 +- .../lambda/tests/request_id.rs | 6 +- .../no-default-features/Cargo.toml | 2 +- .../tests/client-construction.rs | 2 +- aws/sdk/integration-tests/polly/Cargo.toml | 2 +- .../polly/tests/presigning.rs | 4 +- .../integration-tests/qldbsession/Cargo.toml | 2 +- .../qldbsession/tests/integration.rs | 8 +-- aws/sdk/integration-tests/s3/Cargo.toml | 4 +- .../s3/tests/body_size_hint.rs | 4 +- .../integration-tests/s3/tests/checksums.rs | 14 ++-- .../s3/tests/customizable-operation.rs | 2 +- .../s3/tests/expires_interceptor.rs | 6 +- aws/sdk/integration-tests/s3/tests/express.rs | 18 +++--- .../s3/tests/identity-cache.rs | 16 +++-- .../s3/tests/ignore-invalid-xml-body-root.rs | 6 +- .../s3/tests/interceptors.rs | 4 +- .../s3/tests/naughty-string-metadata.rs | 2 +- .../integration-tests/s3/tests/presigning.rs | 4 +- .../integration-tests/s3/tests/request_id.rs | 10 +-- .../tests/retry-classifier-customization.rs | 12 ++-- .../integration-tests/s3/tests/signing-it.rs | 6 +- .../s3/tests/stalled-stream-protection.rs | 6 +- .../s3/tests/status-200-errors.rs | 4 +- .../s3/tests/streaming-response.rs | 4 +- .../integration-tests/s3control/Cargo.toml | 2 +- .../s3control/tests/signing-it.rs | 6 +- .../transcribestreaming/Cargo.toml | 2 +- .../codegen/core/rustlang/CargoDependency.kt | 6 +- rust-runtime/Cargo.lock | 1 + rust-runtime/aws-smithy-types/Cargo.toml | 2 +- rust-runtime/inlineable/Cargo.toml | 4 +- .../inlineable/src/serialization_settings.rs | 16 +++-- 59 files changed, 195 insertions(+), 173 deletions(-) diff --git a/aws/rust-runtime/Cargo.lock b/aws/rust-runtime/Cargo.lock index 017a001b0a..a4cfff2689 100644 --- a/aws/rust-runtime/Cargo.lock +++ b/aws/rust-runtime/Cargo.lock @@ -144,7 +144,7 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.4.3" +version = "1.4.4" dependencies = [ "arbitrary", "aws-credential-types", @@ -190,7 +190,7 @@ version = "0.60.3" [[package]] name = "aws-sigv4" -version = "1.2.5" +version = "1.3.0" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", diff --git a/aws/rust-runtime/aws-config/Cargo.lock b/aws/rust-runtime/aws-config/Cargo.lock index ea24351602..73daf5e1f4 100644 --- a/aws/rust-runtime/aws-config/Cargo.lock +++ b/aws/rust-runtime/aws-config/Cargo.lock @@ -51,7 +51,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.9" +version = "1.6.0" dependencies = [ "aws-credential-types", "aws-runtime", diff --git a/aws/rust-runtime/aws-config/Cargo.toml b/aws/rust-runtime/aws-config/Cargo.toml index 73120d9024..cc4ad3f03d 100644 --- a/aws/rust-runtime/aws-config/Cargo.toml +++ b/aws/rust-runtime/aws-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-config" -version = "1.5.9" +version = "1.6.0" authors = [ "AWS Rust SDK Team ", "Russell Cohen ", diff --git a/aws/rust-runtime/aws-inlineable/Cargo.toml b/aws/rust-runtime/aws-inlineable/Cargo.toml index 76f97b893a..43449c2249 100644 --- a/aws/rust-runtime/aws-inlineable/Cargo.toml +++ b/aws/rust-runtime/aws-inlineable/Cargo.toml @@ -28,7 +28,8 @@ aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types", features = bytes = "1" fastrand = "2.0.0" hex = "0.4.3" -http-02x = { package = "http", version = "0.2.9" } +# FIXME(hyper1) - due to the way codegen generates crate dependencies right now we have to match the codegen names used for theses +http = { package = "http", version = "0.2.9" } http-body = "0.4.5" http-1x = { package = "http", version = "1" } http-body-1x = { package = "http-body", version = "1", optional = true } diff --git a/aws/rust-runtime/aws-inlineable/src/presigning.rs b/aws/rust-runtime/aws-inlineable/src/presigning.rs index 8717389729..c19d160e18 100644 --- a/aws/rust-runtime/aws-inlineable/src/presigning.rs +++ b/aws/rust-runtime/aws-inlineable/src/presigning.rs @@ -227,13 +227,13 @@ impl PresignedRequest { /// Given a body, produce an `http::Request` from this `PresignedRequest` #[deprecated = "Prefer the `make_http_1x_request()` instead by enabling the `http-1x` feature."] #[allow(deprecated)] - pub fn make_http_02x_request(&self, body: B) -> http_02x::Request { + pub fn make_http_02x_request(&self, body: B) -> http::Request { self.clone().into_http_02x_request(body) } /// Converts this `PresignedRequest` directly into an `http` request. #[deprecated = "Prefer the `into_http_1x_request` instead by enabling the `http-1x` feature."] - pub fn into_http_02x_request(self, body: B) -> http_02x::Request { + pub fn into_http_02x_request(self, body: B) -> http::Request { self.http_request .try_into_http02x() .expect("constructor validated convertibility") diff --git a/aws/rust-runtime/aws-runtime/Cargo.toml b/aws/rust-runtime/aws-runtime/Cargo.toml index dd0e16365a..c53770df65 100644 --- a/aws/rust-runtime/aws-runtime/Cargo.toml +++ b/aws/rust-runtime/aws-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-runtime" -version = "1.4.3" +version = "1.5.0" authors = ["AWS Rust SDK Team "] description = "Runtime support code for the AWS SDK. This crate isn't intended to be used directly." edition = "2021" diff --git a/aws/rust-runtime/aws-sigv4/Cargo.toml b/aws/rust-runtime/aws-sigv4/Cargo.toml index 1948e0276d..b9a66921b2 100644 --- a/aws/rust-runtime/aws-sigv4/Cargo.toml +++ b/aws/rust-runtime/aws-sigv4/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-sigv4" -version = "1.2.5" +version = "1.3.0" authors = ["AWS Rust SDK Team ", "David Barsky "] description = "SigV4 signer for HTTP requests and Event Stream messages." edition = "2021" diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt index 0c3cc189b4..2335419606 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt @@ -171,7 +171,7 @@ class AwsPresigningDecorator internal constructor( Feature( "http-1x", default = false, - listOf("dep:http-1x", "dep:http-body-1x", "aws-smithy-runtime-api/http-1x"), + listOf("dep:http-body-1x", "aws-smithy-runtime-api/http-1x"), ), ) } diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt index 2794fc0295..c0f1a0d186 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt @@ -36,7 +36,7 @@ internal fun RuntimeConfig.awsInlineableHttpRequestChecksum() = CargoDependency.Tracing, AwsCargoDependency.awsRuntime(this).withFeature("http-02x"), CargoDependency.smithyChecksums(this), - CargoDependency.smithyHttp(this), + CargoDependency.smithyHttp(this).withFeature("compat"), CargoDependency.smithyRuntimeApiClient(this), CargoDependency.smithyTypes(this), ), diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt index 002ef93c5e..05eb566e7a 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt @@ -18,7 +18,8 @@ import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Compani import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.FuturesUtil import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.HdrHistogram import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.Hound -import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.HttpBody +import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.Http1x +import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.HttpBody1x import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.SerdeJson import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.Smol import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency.Companion.TempFile @@ -105,6 +106,8 @@ class IntegrationTestDependencies( addDependency(Tokio) addDependency(Tracing.toDevDependency()) addDependency(TracingSubscriber) + addDependency(smithyHttpClient(runtimeConfig).copy(features = setOf("test-util", "wire-mock"), scope = DependencyScope.Dev)) + addDependency(Http1x.toDevDependency()) } if (hasBenches) { addDependency(Criterion) @@ -146,13 +149,13 @@ class S3TestDependencies(private val codegenContext: ClientCodegenContext) : Lib override fun section(section: LibRsSection): Writable = writable { addDependency(awsConfig(codegenContext.runtimeConfig).toDevDependency().withFeature("behavior-version-latest")) - addDependency(smithyHttpClient(codegenContext.runtimeConfig).toDevDependency()) + addDependency(smithyHttpClient(codegenContext.runtimeConfig).toDevDependency().withFeature("crypto-ring")) addDependency(AsyncStd) addDependency(BytesUtils.toDevDependency()) addDependency(FastRand.toDevDependency()) addDependency(FuturesUtil.toDevDependency()) addDependency(HdrHistogram) - addDependency(HttpBody.toDevDependency()) + addDependency(HttpBody1x.toDevDependency().copy(optional = false)) addDependency(Smol) addDependency(TempFile) addDependency(TracingAppender) diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/GlacierDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/GlacierDecorator.kt index 9b4a79172e..44e219e035 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/GlacierDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/GlacierDecorator.kt @@ -158,4 +158,5 @@ private fun glacierInterceptorDependencies(runtimeConfig: RuntimeConfig) = CargoDependency.Ring, CargoDependency.smithyHttp(runtimeConfig), CargoDependency.smithyRuntimeApiClient(runtimeConfig), + CargoDependency.Http1x, ) diff --git a/aws/sdk/integration-tests/dynamodb/Cargo.toml b/aws/sdk/integration-tests/dynamodb/Cargo.toml index 169caeecf0..d8abceac3f 100644 --- a/aws/sdk/integration-tests/dynamodb/Cargo.toml +++ b/aws/sdk/integration-tests/dynamodb/Cargo.toml @@ -26,7 +26,7 @@ aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types", features aws-types = { path = "../../build/aws-sdk/sdk/aws-types" } bytes = "1.0.0" futures-util = { version = "0.3.29", default-features = false } -http = "1" +http-1x = { package = "http", version = "1" } serde_json = "1.0.0" tokio = { version = "1.23.1", features = ["full", "test-util"] } tokio-stream = "0.1.5" diff --git a/aws/sdk/integration-tests/dynamodb/benches/deserialization_bench.rs b/aws/sdk/integration-tests/dynamodb/benches/deserialization_bench.rs index 1928a49ecb..c9c9d2cceb 100644 --- a/aws/sdk/integration-tests/dynamodb/benches/deserialization_bench.rs +++ b/aws/sdk/integration-tests/dynamodb/benches/deserialization_bench.rs @@ -14,7 +14,7 @@ fn do_bench() { use aws_sdk_dynamodb::operation::query::Query; use bytes::Bytes; - let response = HttpResponse::try_from(http::Response::builder() + let response = HttpResponse::try_from(http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:23 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -22,7 +22,7 @@ fn do_bench() { .header("connection", "keep-alive") .header("x-amzn-requestid", "A5FGSJ9ET4OKB8183S9M47RQQBVV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "624725176") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(Bytes::copy_from_slice(br#"{"Count":2,"Items":[{"year":{"N":"2013"},"info":{"M":{"actors":{"L":[{"S":"Daniel Bruhl"},{"S":"Chris Hemsworth"},{"S":"Olivia Wilde"}]},"plot":{"S":"A re-creation of the merciless 1970s rivalry between Formula One rivals James Hunt and Niki Lauda."},"release_date":{"S":"2013-09-02T00:00:00Z"},"image_url":{"S":"http://ia.media-imdb.com/images/M/MV5BMTQyMDE0MTY0OV5BMl5BanBnXkFtZTcwMjI2OTI0OQ@@._V1_SX400_.jpg"},"genres":{"L":[{"S":"Action"},{"S":"Biography"},{"S":"Drama"},{"S":"Sport"}]},"directors":{"L":[{"S":"Ron Howard"}]},"rating":{"N":"8.3"},"rank":{"N":"2"},"running_time_secs":{"N":"7380"}}},"title":{"S":"Rush"}},{"year":{"N":"2013"},"info":{"M":{"actors":{"L":[{"S":"David Matthewman"},{"S":"Ann Thomas"},{"S":"Jonathan G. Neff"}]},"release_date":{"S":"2013-01-18T00:00:00Z"},"plot":{"S":"A rock band plays their music at high volumes, annoying the neighbors."},"genres":{"L":[{"S":"Comedy"},{"S":"Drama"}]},"image_url":{"S":"http://ia.media-imdb.com/images/N/O9ERWAU7FS797AJ7LU8HN09AMUP908RLlo5JF90EWR7LJKQ7@@._V1_SX400_.jpg"},"directors":{"L":[{"S":"Alice Smith"},{"S":"Bob Jones"}]},"rating":{"N":"6.2"},"rank":{"N":"11"},"running_time_secs":{"N":"5215"}}},"title":{"S":"Turn It Down, Or Else!"}}],"ScannedCount":2}"#))) .unwrap()).unwrap(); diff --git a/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs b/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs index a172772a7f..b675a66663 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs @@ -6,7 +6,7 @@ use aws_sdk_dynamodb::config::{self, Credentials, Region}; use aws_smithy_http_client::test_util::capture_request; use aws_types::SdkConfig; -use http::Uri; +use http_1x::Uri; async fn expect_uri( conf: SdkConfig, diff --git a/aws/sdk/integration-tests/dynamodb/tests/movies.rs b/aws/sdk/integration-tests/dynamodb/tests/movies.rs index 3a30570b56..994316f084 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/movies.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/movies.rs @@ -14,8 +14,8 @@ use dynamodb::types::{ ScalarAttributeType, TableStatus, }; use dynamodb::Client; -use http::header::AUTHORIZATION; -use http::Uri; +use http_1x::header::AUTHORIZATION; +use http_1x::Uri; use serde_json::Value; use std::collections::HashMap; use std::time::Duration; @@ -196,7 +196,7 @@ async fn movies_it() { fn movies_it_test_connection() -> StaticReplayClient { StaticReplayClient::new(vec![ ReplayEvent::new( - http::Request::builder() + http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.CreateTable") .header("content-length", "313") @@ -204,7 +204,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("x-amz-date", "20210308T155118Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"AttributeDefinitions":[{"AttributeName":"year","AttributeType":"N"},{"AttributeName":"title","AttributeType":"S"}],"TableName":"Movies-5","KeySchema":[{"AttributeName":"year","KeyType":"HASH"},{"AttributeName":"title","KeyType":"RANGE"}],"ProvisionedThroughput":{"ReadCapacityUnits":10,"WriteCapacityUnits":10}}"#)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:18 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -212,9 +212,9 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "RCII0AALE00UALC7LJ9AD600B7VV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "3715137447") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"TableDescription":{"AttributeDefinitions":[{"AttributeName":"title","AttributeType":"S"},{"AttributeName":"year","AttributeType":"N"}],"CreationDateTime":1.615218678973E9,"ItemCount":0,"KeySchema":[{"AttributeName":"year","KeyType":"HASH"},{"AttributeName":"title","KeyType":"RANGE"}],"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":10,"WriteCapacityUnits":10},"TableArn":"arn:aws:dynamodb:us-east-1:134095065856:table/Movies-5","TableId":"b08c406a-7dbc-4f7d-b7c6-672a43ec21cd","TableName":"Movies-5","TableSizeBytes":0,"TableStatus":"CREATING"}}"#)).unwrap()), - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.DescribeTable") .header("content-length", "24") @@ -222,7 +222,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("x-amz-date", "20210308T155119Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"TableName":"Movies-5"}"#)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:18 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -230,16 +230,16 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "O1C6QKCG8GT7D2K922T4QRL9N3VV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "46742265") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"Table":{"AttributeDefinitions":[{"AttributeName":"title","AttributeType":"S"},{"AttributeName":"year","AttributeType":"N"}],"CreationDateTime":1.615218678973E9,"ItemCount":0,"KeySchema":[{"AttributeName":"year","KeyType":"HASH"},{"AttributeName":"title","KeyType":"RANGE"}],"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":10,"WriteCapacityUnits":10},"TableArn":"arn:aws:dynamodb:us-east-1:134095065856:table/Movies-5","TableId":"b08c406a-7dbc-4f7d-b7c6-672a43ec21cd","TableName":"Movies-5","TableSizeBytes":0,"TableStatus":"CREATING"}}"#)).unwrap()), - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.DescribeTable") .header("content-length", "24") .header("authorization", "AWS4-HMAC-SHA256 Credential=ASIAR6OFQKMAFQIIYZ5T/20210308/us-east-1/dynamodb/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-target, Signature=7f3a743bb460f26296640ae775d282f0153eda750855ec00ace1815becfd2de5") .header("x-amz-date", "20210308T155120Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")).body(SdkBody::from(r#"{"TableName":"Movies-5"}"#)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:20 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -247,9 +247,9 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "EN5N26BO1FAOEMUUSD7B7SUPPVVV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "46742265") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"Table":{"AttributeDefinitions":[{"AttributeName":"title","AttributeType":"S"},{"AttributeName":"year","AttributeType":"N"}],"CreationDateTime":1.615218678973E9,"ItemCount":0,"KeySchema":[{"AttributeName":"year","KeyType":"HASH"},{"AttributeName":"title","KeyType":"RANGE"}],"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":10,"WriteCapacityUnits":10},"TableArn":"arn:aws:dynamodb:us-east-1:134095065856:table/Movies-5","TableId":"b08c406a-7dbc-4f7d-b7c6-672a43ec21cd","TableName":"Movies-5","TableSizeBytes":0,"TableStatus":"CREATING"}}"#)).unwrap()), - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.DescribeTable") .header("content-length", "24") @@ -257,7 +257,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("x-amz-date", "20210308T155121Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"TableName":"Movies-5"}"#)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:21 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -265,9 +265,9 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "PHCMGEVI6JLN9JNMKSSA3M76H3VV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "46742265") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"Table":{"AttributeDefinitions":[{"AttributeName":"title","AttributeType":"S"},{"AttributeName":"year","AttributeType":"N"}],"CreationDateTime":1.615218678973E9,"ItemCount":0,"KeySchema":[{"AttributeName":"year","KeyType":"HASH"},{"AttributeName":"title","KeyType":"RANGE"}],"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":10,"WriteCapacityUnits":10},"TableArn":"arn:aws:dynamodb:us-east-1:134095065856:table/Movies-5","TableId":"b08c406a-7dbc-4f7d-b7c6-672a43ec21cd","TableName":"Movies-5","TableSizeBytes":0,"TableStatus":"CREATING"}}"#)).unwrap()), - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.DescribeTable") .header("content-length", "24") @@ -275,7 +275,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("x-amz-date", "20210308T155122Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"TableName":"Movies-5"}"#)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:22 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -283,9 +283,9 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "1Q22O983HD3511TN6Q5RRTP0MFVV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "46742265") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"Table":{"AttributeDefinitions":[{"AttributeName":"title","AttributeType":"S"},{"AttributeName":"year","AttributeType":"N"}],"CreationDateTime":1.615218678973E9,"ItemCount":0,"KeySchema":[{"AttributeName":"year","KeyType":"HASH"},{"AttributeName":"title","KeyType":"RANGE"}],"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":10,"WriteCapacityUnits":10},"TableArn":"arn:aws:dynamodb:us-east-1:134095065856:table/Movies-5","TableId":"b08c406a-7dbc-4f7d-b7c6-672a43ec21cd","TableName":"Movies-5","TableSizeBytes":0,"TableStatus":"CREATING"}}"#)).unwrap()), - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.DescribeTable") .header("content-length", "24") @@ -293,7 +293,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("x-amz-date", "20210308T155123Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"TableName":"Movies-5"}"#)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:23 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -301,9 +301,9 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "ONJBNV2A9GBNUT34KH73JLL23BVV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "24113616") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"Table":{"AttributeDefinitions":[{"AttributeName":"title","AttributeType":"S"},{"AttributeName":"year","AttributeType":"N"}],"CreationDateTime":1.615218678973E9,"ItemCount":0,"KeySchema":[{"AttributeName":"year","KeyType":"HASH"},{"AttributeName":"title","KeyType":"RANGE"}],"ProvisionedThroughput":{"NumberOfDecreasesToday":0,"ReadCapacityUnits":10,"WriteCapacityUnits":10},"TableArn":"arn:aws:dynamodb:us-east-1:134095065856:table/Movies-5","TableId":"b08c406a-7dbc-4f7d-b7c6-672a43ec21cd","TableName":"Movies-5","TableSizeBytes":0,"TableStatus":"ACTIVE"}}"#)).unwrap()), - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.PutItem") .header("content-length", "619") @@ -311,7 +311,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("x-amz-date", "20210308T155123Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"TableName":"Movies-5","Item":{"info":{"M":{"rating":{"N":"6.2"},"genres":{"L":[{"S":"Comedy"},{"S":"Drama"}]},"image_url":{"S":"http://ia.media-imdb.com/images/N/O9ERWAU7FS797AJ7LU8HN09AMUP908RLlo5JF90EWR7LJKQ7@@._V1_SX400_.jpg"},"release_date":{"S":"2013-01-18T00:00:00Z"},"actors":{"L":[{"S":"David Matthewman"},{"S":"Ann Thomas"},{"S":"Jonathan G. Neff"}]},"plot":{"S":"A rock band plays their music at high volumes, annoying the neighbors."},"running_time_secs":{"N":"5215"},"rank":{"N":"11"},"directors":{"L":[{"S":"Alice Smith"},{"S":"Bob Jones"}]}}},"title":{"S":"Turn It Down, Or Else!"},"year":{"N":"2013"}}}"#)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:23 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -319,9 +319,9 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "E6TGS5HKHHV08HSQA31IO1IDMFVV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "2745614147") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{}"#)).unwrap()), - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.PutItem") .header("content-length", "636") @@ -329,7 +329,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("x-amz-date", "20210308T155123Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"TableName":"Movies-5","Item":{"info":{"M":{"plot":{"S":"A re-creation of the merciless 1970s rivalry between Formula One rivals James Hunt and Niki Lauda."},"rating":{"N":"8.3"},"rank":{"N":"2"},"release_date":{"S":"2013-09-02T00:00:00Z"},"directors":{"L":[{"S":"Ron Howard"}]},"image_url":{"S":"http://ia.media-imdb.com/images/M/MV5BMTQyMDE0MTY0OV5BMl5BanBnXkFtZTcwMjI2OTI0OQ@@._V1_SX400_.jpg"},"actors":{"L":[{"S":"Daniel Bruhl"},{"S":"Chris Hemsworth"},{"S":"Olivia Wilde"}]},"running_time_secs":{"N":"7380"},"genres":{"L":[{"S":"Action"},{"S":"Biography"},{"S":"Drama"},{"S":"Sport"}]}}},"title":{"S":"Rush"},"year":{"N":"2013"}}}"#)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:23 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -337,9 +337,9 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "B63D54LP2FOGQK9JE5KLJT49HJVV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "2745614147") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{}"#)).unwrap()), - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.Query") .header("content-length", "156") @@ -347,7 +347,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("x-amz-date", "20210308T155123Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r##"{"TableName":"Movies-5","KeyConditionExpression":"#yr = :yyyy","ExpressionAttributeNames":{"#yr":"year"},"ExpressionAttributeValues":{":yyyy":{"N":"2222"}}}"##)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:23 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -355,9 +355,9 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "AUAS9KJ0TK9BSR986TRPC2RGTRVV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "3413411624") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"Count":0,"Items":[],"ScannedCount":0}"#)).unwrap()), - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "DynamoDB_20120810.Query") .header("content-length", "156") @@ -365,7 +365,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("x-amz-date", "20210308T155123Z") .uri(Uri::from_static("https://dynamodb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r##"{"TableName":"Movies-5","KeyConditionExpression":"#yr = :yyyy","ExpressionAttributeNames":{"#yr":"year"},"ExpressionAttributeValues":{":yyyy":{"N":"2013"}}}"##)).unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("server", "Server") .header("date", "Mon, 08 Mar 2021 15:51:23 GMT") .header("content-type", "application/x-amz-json-1.0") @@ -373,7 +373,7 @@ fn movies_it_test_connection() -> StaticReplayClient { .header("connection", "keep-alive") .header("x-amzn-requestid", "A5FGSJ9ET4OKB8183S9M47RQQBVV4KQNSO5AEMVJF66Q9ASUAAJG") .header("x-amz-crc32", "624725176") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"Count":2,"Items":[{"year":{"N":"2013"},"info":{"M":{"actors":{"L":[{"S":"Daniel Bruhl"},{"S":"Chris Hemsworth"},{"S":"Olivia Wilde"}]},"plot":{"S":"A re-creation of the merciless 1970s rivalry between Formula One rivals James Hunt and Niki Lauda."},"release_date":{"S":"2013-09-02T00:00:00Z"},"image_url":{"S":"http://ia.media-imdb.com/images/M/MV5BMTQyMDE0MTY0OV5BMl5BanBnXkFtZTcwMjI2OTI0OQ@@._V1_SX400_.jpg"},"genres":{"L":[{"S":"Action"},{"S":"Biography"},{"S":"Drama"},{"S":"Sport"}]},"directors":{"L":[{"S":"Ron Howard"}]},"rating":{"N":"8.3"},"rank":{"N":"2"},"running_time_secs":{"N":"7380"}}},"title":{"S":"Rush"}},{"year":{"N":"2013"},"info":{"M":{"actors":{"L":[{"S":"David Matthewman"},{"S":"Ann Thomas"},{"S":"Jonathan G. Neff"}]},"release_date":{"S":"2013-01-18T00:00:00Z"},"plot":{"S":"A rock band plays their music at high volumes, annoying the neighbors."},"genres":{"L":[{"S":"Comedy"},{"S":"Drama"}]},"image_url":{"S":"http://ia.media-imdb.com/images/N/O9ERWAU7FS797AJ7LU8HN09AMUP908RLlo5JF90EWR7LJKQ7@@._V1_SX400_.jpg"},"directors":{"L":[{"S":"Alice Smith"},{"S":"Bob Jones"}]},"rating":{"N":"6.2"},"rank":{"N":"11"},"running_time_secs":{"N":"5215"}}},"title":{"S":"Turn It Down, Or Else!"}}],"ScannedCount":2}"#)).unwrap()) ]) } diff --git a/aws/sdk/integration-tests/dynamodb/tests/paginators.rs b/aws/sdk/integration-tests/dynamodb/tests/paginators.rs index cffbcf9286..5599229204 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/paginators.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/paginators.rs @@ -44,15 +44,17 @@ async fn paginators_pass_args() { )); } -fn mk_request(body: &'static str) -> http::Request { - http::Request::builder() +fn mk_request(body: &'static str) -> http_1x::Request { + http_1x::Request::builder() .uri("https://dynamodb.us-east-1.amazonaws.com/") .body(SdkBody::from(body)) .unwrap() } -fn mk_response(body: &'static str) -> http::Response { - http::Response::builder().body(SdkBody::from(body)).unwrap() +fn mk_response(body: &'static str) -> http_1x::Response { + http_1x::Response::builder() + .body(SdkBody::from(body)) + .unwrap() } #[tokio::test(flavor = "current_thread")] diff --git a/aws/sdk/integration-tests/dynamodb/tests/retries-with-client-rate-limiting.rs b/aws/sdk/integration-tests/dynamodb/tests/retries-with-client-rate-limiting.rs index 35e0ac8da1..f4b6ac5cb0 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/retries-with-client-rate-limiting.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/retries-with-client-rate-limiting.rs @@ -14,15 +14,15 @@ use aws_smithy_runtime::client::retries::RetryPartition; use aws_smithy_types::body::SdkBody; use std::time::{Duration, SystemTime}; -fn req() -> http::Request { - http::Request::builder() +fn req() -> http_1x::Request { + http_1x::Request::builder() .body(SdkBody::from("request body")) .unwrap() } -fn ok() -> http::Response { +fn ok() -> http_1x::Response { let body = "{ \"TableNames\": [ \"Test\" ] }"; - http::Response::builder() + http_1x::Response::builder() .status(200) .header("server", "Server") .header("content-type", "application/x-amz-json-1.0") @@ -33,15 +33,15 @@ fn ok() -> http::Response { .unwrap() } -fn err() -> http::Response { - http::Response::builder() +fn err() -> http_1x::Response { + http_1x::Response::builder() .status(500) .body(SdkBody::from("{ \"message\": \"The request has failed because of an unknown error, exception or failure.\", \"code\": \"InternalServerError\" }")) .unwrap() } -fn throttling_err() -> http::Response { - http::Response::builder() +fn throttling_err() -> http_1x::Response { + http_1x::Response::builder() .status(400) .body(SdkBody::from("{ \"message\": \"The request was denied due to request throttling.\", \"code\": \"ThrottlingException\" }")) .unwrap() diff --git a/aws/sdk/integration-tests/dynamodb/tests/shared-config.rs b/aws/sdk/integration-tests/dynamodb/tests/shared-config.rs index 6e6d9b3809..b0ed8a4e00 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/shared-config.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/shared-config.rs @@ -5,7 +5,7 @@ use aws_sdk_dynamodb::config::{Credentials, Region, StalledStreamProtectionConfig}; use aws_smithy_http_client::test_util::capture_request; -use http::Uri; +use http_1x::Uri; /// Iterative test of loading clients from shared configuration #[tokio::test] diff --git a/aws/sdk/integration-tests/ec2/Cargo.toml b/aws/sdk/integration-tests/ec2/Cargo.toml index 15bd72ded4..5738cbaba0 100644 --- a/aws/sdk/integration-tests/ec2/Cargo.toml +++ b/aws/sdk/integration-tests/ec2/Cargo.toml @@ -16,5 +16,5 @@ aws-smithy-runtime-api = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime-ap aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } aws-sdk-ec2 = { path = "../../build/aws-sdk/sdk/ec2", features = ["behavior-version-latest", "test-util"] } tokio = { version = "1.23.1", features = ["full"]} -http = "1" +http-1x = { package = "http", version = "1" } tokio-stream = "0.1.5" diff --git a/aws/sdk/integration-tests/ec2/tests/paginators.rs b/aws/sdk/integration-tests/ec2/tests/paginators.rs index 339752b1cd..4befb50e21 100644 --- a/aws/sdk/integration-tests/ec2/tests/paginators.rs +++ b/aws/sdk/integration-tests/ec2/tests/paginators.rs @@ -36,7 +36,7 @@ async fn paginators_handle_empty_tokens() { "#; - let response = http::Response::builder() + let response = http_1x::Response::builder() .status(200) .body(SdkBody::from(response)) .unwrap(); @@ -69,7 +69,7 @@ async fn paginators_handle_unset_tokens() { edf3e86c-4baf-47c1-9228-9a5ea09542e8 "#; - let response = http::Response::builder() + let response = http_1x::Response::builder() .status(200) .body(SdkBody::from(response)) .unwrap(); diff --git a/aws/sdk/integration-tests/glacier/Cargo.toml b/aws/sdk/integration-tests/glacier/Cargo.toml index ecca077924..707405bcec 100644 --- a/aws/sdk/integration-tests/glacier/Cargo.toml +++ b/aws/sdk/integration-tests/glacier/Cargo.toml @@ -17,6 +17,6 @@ aws-smithy-protocol-test = { path = "../../build/aws-sdk/sdk/aws-smithy-protocol aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } bytes = "1.0.0" -http = "1" +http-1x = { package = "http", version = "1" } tokio = { version = "1.23.1", features = ["full", "test-util"]} tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/iam/Cargo.toml b/aws/sdk/integration-tests/iam/Cargo.toml index 139891e63f..bb77e0c6a7 100644 --- a/aws/sdk/integration-tests/iam/Cargo.toml +++ b/aws/sdk/integration-tests/iam/Cargo.toml @@ -17,6 +17,6 @@ aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", feat aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } bytes = "1.0.0" -http = "1" +http-1x = { package = "http", version = "1" } tokio = { version = "1.23.1", features = ["full", "test-util"]} tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/kms/Cargo.toml b/aws/sdk/integration-tests/kms/Cargo.toml index e65eff2c3b..f96c8484cd 100644 --- a/aws/sdk/integration-tests/kms/Cargo.toml +++ b/aws/sdk/integration-tests/kms/Cargo.toml @@ -25,6 +25,6 @@ aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", feat aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-smithy-runtime-api = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["test-util"] } bytes = "1.0.0" -http = "1" +http-1x = { package = "http", version = "1" } tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/kms/tests/integration.rs b/aws/sdk/integration-tests/kms/tests/integration.rs index b0747053d5..2a70fdabf4 100644 --- a/aws/sdk/integration-tests/kms/tests/integration.rs +++ b/aws/sdk/integration-tests/kms/tests/integration.rs @@ -8,7 +8,7 @@ use aws_sdk_kms::operation::RequestId; use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_runtime_api::client::result::SdkError; use aws_smithy_types::body::SdkBody; -use http::Uri; +use http_1x::Uri; use kms::config::{Config, Credentials, Region}; // TODO(DVR): having the full HTTP requests right in the code is a bit gross, consider something @@ -19,11 +19,11 @@ use kms::config::{Config, Credentials, Region}; #[tokio::test] async fn generate_random_cn() { let http_client= StaticReplayClient::new(vec![ReplayEvent::new( - http::Request::builder() + http_1x::Request::builder() .uri(Uri::from_static("https://kms.cn-north-1.amazonaws.com.cn/")) .body(SdkBody::from(r#"{"NumberOfBytes":64}"#)).unwrap(), - http::Response::builder() - .status(http::StatusCode::from_u16(200).unwrap()) + http_1x::Response::builder() + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"Plaintext":"6CG0fbzzhg5G2VcFCPmJMJ8Njv3voYCgrGlp3+BZe7eDweCXgiyDH9BnkKvLmS7gQhnYDUlyES3fZVGwv5+CxA=="}"#)).unwrap()) ]); let conf = Config::builder() @@ -47,7 +47,7 @@ async fn generate_random_cn() { #[tokio::test] async fn generate_random() { let http_client = StaticReplayClient::new(vec![ReplayEvent::new( - http::Request::builder() + http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.1") .header("x-amz-target", "TrentService.GenerateRandom") .header("content-length", "20") @@ -57,8 +57,8 @@ async fn generate_random() { .header("x-amz-user-agent", "aws-sdk-rust/0.123.test api/test-service/0.123 os/windows/XPSP3 lang/rust/1.50.0") .uri(Uri::from_static("https://kms.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"NumberOfBytes":64}"#)).unwrap(), - http::Response::builder() - .status(http::StatusCode::from_u16(200).unwrap()) + http_1x::Response::builder() + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{"Plaintext":"6CG0fbzzhg5G2VcFCPmJMJ8Njv3voYCgrGlp3+BZe7eDweCXgiyDH9BnkKvLmS7gQhnYDUlyES3fZVGwv5+CxA=="}"#)).unwrap()) ]); let conf = Config::builder() @@ -95,9 +95,9 @@ async fn generate_random() { #[tokio::test] async fn generate_random_malformed_response() { let http_client = StaticReplayClient::new(vec![ReplayEvent::new( - http::Request::builder().body(SdkBody::from(r#"{"NumberOfBytes":64}"#)).unwrap(), - http::Response::builder() - .status(http::StatusCode::from_u16(200).unwrap()) + http_1x::Request::builder().body(SdkBody::from(r#"{"NumberOfBytes":64}"#)).unwrap(), + http_1x::Response::builder() + .status(http_1x::StatusCode::from_u16(200).unwrap()) // last `}` replaced with a space, invalid JSON .body(SdkBody::from(r#"{"Plaintext":"6CG0fbzzhg5G2VcFCPmJMJ8Njv3voYCgrGlp3+BZe7eDweCXgiyDH9BnkKvLmS7gQhnYDUlyES3fZVGwv5+CxA==" "#)).unwrap()) ]); @@ -119,7 +119,7 @@ async fn generate_random_malformed_response() { #[tokio::test] async fn generate_random_keystore_not_found() { let http_client = StaticReplayClient::new(vec![ReplayEvent::new( - http::Request::builder() + http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.1") .header("x-amz-target", "TrentService.GenerateRandom") .header("content-length", "56") @@ -129,8 +129,8 @@ async fn generate_random_keystore_not_found() { .header("x-amz-user-agent", "aws-sdk-rust/0.123.test api/test-service/0.123 os/windows/XPSP3 lang/rust/1.50.0") .uri(Uri::from_static("https://kms.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"NumberOfBytes":64,"CustomKeyStoreId":"does not exist"}"#)).unwrap(), - http::Response::builder() - .status(http::StatusCode::from_u16(400).unwrap()) + http_1x::Response::builder() + .status(http_1x::StatusCode::from_u16(400).unwrap()) .header("x-amzn-requestid", "bfe81a0a-9a08-4e71-9910-cdb5ab6ea3b6") .header("cache-control", "no-cache, no-store, must-revalidate, private") .header("expires", "0") diff --git a/aws/sdk/integration-tests/kms/tests/retryable_errors.rs b/aws/sdk/integration-tests/kms/tests/retryable_errors.rs index f243bc5325..e8dfb20c8f 100644 --- a/aws/sdk/integration-tests/kms/tests/retryable_errors.rs +++ b/aws/sdk/integration-tests/kms/tests/retryable_errors.rs @@ -15,7 +15,7 @@ use bytes::Bytes; use kms::operation::create_alias::CreateAliasError; async fn make_err( - response: impl Fn() -> http::Response + Send + Sync + 'static, + response: impl Fn() -> http_1x::Response + Send + Sync + 'static, ) -> SdkError { let http_client = infallible_client_fn(move |_| response()); let conf = kms::Config::builder() @@ -35,7 +35,7 @@ async fn make_err( #[tokio::test] async fn errors_are_retryable() { let err = make_err(|| { - http::Response::builder() + http_1x::Response::builder() .status(400) .body(Bytes::from_static( br#"{ "code": "LimitExceededException" }"#, @@ -56,7 +56,7 @@ async fn errors_are_retryable() { #[tokio::test] async fn unmodeled_errors_are_retryable() { let err = make_err(|| { - http::Response::builder() + http_1x::Response::builder() .status(400) .body(Bytes::from_static(br#"{ "code": "ThrottlingException" }"#)) .unwrap() diff --git a/aws/sdk/integration-tests/lambda/Cargo.toml b/aws/sdk/integration-tests/lambda/Cargo.toml index e35e080cee..2ff0565aa7 100644 --- a/aws/sdk/integration-tests/lambda/Cargo.toml +++ b/aws/sdk/integration-tests/lambda/Cargo.toml @@ -18,7 +18,7 @@ aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-clien base64 = "0.13.0" bytes = "1.0.0" futures-core = "0.3.29" -http = "1" +http-1x = { package = "http", version = "1" } serde_json = "1.0.0" tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/lambda/tests/naughty-strings-client-context.rs b/aws/sdk/integration-tests/lambda/tests/naughty-strings-client-context.rs index 934dda7ff2..4cffb2a4fa 100644 --- a/aws/sdk/integration-tests/lambda/tests/naughty-strings-client-context.rs +++ b/aws/sdk/integration-tests/lambda/tests/naughty-strings-client-context.rs @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -// use http::HeaderValue; +// use http_1x::HeaderValue; const NAUGHTY_STRINGS: &str = include_str!("blns/blns.txt"); diff --git a/aws/sdk/integration-tests/lambda/tests/request_id.rs b/aws/sdk/integration-tests/lambda/tests/request_id.rs index db889048d6..3f75afa0fc 100644 --- a/aws/sdk/integration-tests/lambda/tests/request_id.rs +++ b/aws/sdk/integration-tests/lambda/tests/request_id.rs @@ -11,7 +11,7 @@ use aws_smithy_http_client::test_util::infallible_client_fn; #[allow(deprecated)] async fn run_test( - response: impl Fn() -> http::Response<&'static str> + Send + Sync + 'static, + response: impl Fn() -> http_1x::Response<&'static str> + Send + Sync + 'static, expect_error: bool, ) { let http_client = infallible_client_fn(move |_| response()); @@ -37,7 +37,7 @@ async fn run_test( async fn get_request_id_from_unmodeled_error() { run_test( || { - http::Response::builder() + http_1x::Response::builder() .header("x-amzn-RequestId", "correct-request-id") .header("X-Amzn-Errortype", "ListFunctions") .status(500) @@ -53,7 +53,7 @@ async fn get_request_id_from_unmodeled_error() { async fn get_request_id_from_successful_response() { run_test( || { - http::Response::builder() + http_1x::Response::builder() .header("x-amzn-RequestId", "correct-request-id") .status(200) .body(r#"{"Functions":[],"NextMarker":null}"#) diff --git a/aws/sdk/integration-tests/no-default-features/Cargo.toml b/aws/sdk/integration-tests/no-default-features/Cargo.toml index 04b0fe790d..1b9164b4c2 100644 --- a/aws/sdk/integration-tests/no-default-features/Cargo.toml +++ b/aws/sdk/integration-tests/no-default-features/Cargo.toml @@ -23,4 +23,4 @@ aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", futures = "0.3.25" tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } -http = "1" +http-1x = { package = "http", version = "1" } diff --git a/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs b/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs index 1c0ef17d63..0d7be1625f 100644 --- a/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs +++ b/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs @@ -68,7 +68,7 @@ async fn test_clients_from_service_config() { async fn test_missing_behavior_version() { use aws_sdk_s3::config::Region; let http_client = - infallible_client_fn(|_req| http::Response::builder().body(SdkBody::empty()).unwrap()); + infallible_client_fn(|_req| http_1x::Response::builder().body(SdkBody::empty()).unwrap()); let config = Config::builder() .region(Region::new("us-east-1")) diff --git a/aws/sdk/integration-tests/polly/Cargo.toml b/aws/sdk/integration-tests/polly/Cargo.toml index c79bc1302e..4e3cc965d0 100644 --- a/aws/sdk/integration-tests/polly/Cargo.toml +++ b/aws/sdk/integration-tests/polly/Cargo.toml @@ -15,6 +15,6 @@ aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", aws-sdk-polly = { path = "../../build/aws-sdk/sdk/polly", features = ["behavior-version-latest"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } bytes = "1.0.0" -http = "1" +http-1x = { package = "http", version = "1" } tokio = { version = "1.23.1", features = ["full"]} tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/polly/tests/presigning.rs b/aws/sdk/integration-tests/polly/tests/presigning.rs index 51cfe93d5b..cc6b0a6cc8 100644 --- a/aws/sdk/integration-tests/polly/tests/presigning.rs +++ b/aws/sdk/integration-tests/polly/tests/presigning.rs @@ -32,7 +32,7 @@ async fn test_presigning() { .await .expect("success"); - let uri = presigned.uri().parse::().unwrap(); + let uri = presigned.uri().parse::().unwrap(); let pq = uri.path_and_query().unwrap(); let path = pq.path(); let query = pq.query().unwrap(); @@ -85,7 +85,7 @@ async fn test_presigning_customized() { .await .expect("success"); - let uri = presigned.uri().parse::().unwrap(); + let uri = presigned.uri().parse::().unwrap(); let pq = uri.path_and_query().unwrap(); let path = pq.path(); let query = pq.query().unwrap(); diff --git a/aws/sdk/integration-tests/qldbsession/Cargo.toml b/aws/sdk/integration-tests/qldbsession/Cargo.toml index b5f0ddf4e6..e6337e6e73 100644 --- a/aws/sdk/integration-tests/qldbsession/Cargo.toml +++ b/aws/sdk/integration-tests/qldbsession/Cargo.toml @@ -22,6 +22,6 @@ aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["client"] } aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-client", features = ["test-util"] } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } -http = "1" +http-1x = { package = "http", version = "1" } tokio = { version = "1.23.1", features = ["full"]} tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/qldbsession/tests/integration.rs b/aws/sdk/integration-tests/qldbsession/tests/integration.rs index 30460bcc94..1827eb23af 100644 --- a/aws/sdk/integration-tests/qldbsession/tests/integration.rs +++ b/aws/sdk/integration-tests/qldbsession/tests/integration.rs @@ -10,13 +10,13 @@ use aws_sdk_qldbsession::types::StartSessionRequest; use aws_sdk_qldbsession::Client; use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; -use http::Uri; +use http_1x::Uri; #[cfg(feature = "test-util")] #[tokio::test] async fn signv4_use_correct_service_name() { let http_client = StaticReplayClient::new(vec![ReplayEvent::new( - http::Request::builder() + http_1x::Request::builder() .header("content-type", "application/x-amz-json-1.0") .header("x-amz-target", "QLDBSession.SendCommand") .header("content-length", "49") @@ -26,8 +26,8 @@ async fn signv4_use_correct_service_name() { .header("user-agent", "aws-sdk-rust/0.123.test os/windows/XPSP3 lang/rust/1.50.0") .uri(Uri::from_static("https://session.qldb.us-east-1.amazonaws.com/")) .body(SdkBody::from(r#"{"StartSession":{"LedgerName":"not-real-ledger"}}"#)).unwrap(), - http::Response::builder() - .status(http::StatusCode::from_u16(200).unwrap()) + http_1x::Response::builder() + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"{}"#)).unwrap()), ]); let conf = Config::builder() diff --git a/aws/sdk/integration-tests/s3/Cargo.toml b/aws/sdk/integration-tests/s3/Cargo.toml index 46e52513c9..5c35bcd7bb 100644 --- a/aws/sdk/integration-tests/s3/Cargo.toml +++ b/aws/sdk/integration-tests/s3/Cargo.toml @@ -33,8 +33,8 @@ bytes-utils = "0.1.2" fastrand = "2.0.1" futures-util = { version = "0.3.29", default-features = false, features = ["alloc"] } hdrhistogram = "7.5.2" -http = "1" -http-body = "1" +http-1x = { package = "http", version = "1" } +http-body-1x = { package = "http-body", version = "1" } hyper = { version = "0.14.26", features = ["stream"] } once_cell = "1.18.0" pretty_assertions = "1.3" diff --git a/aws/sdk/integration-tests/s3/tests/body_size_hint.rs b/aws/sdk/integration-tests/s3/tests/body_size_hint.rs index c350e2c86e..458a224e54 100644 --- a/aws/sdk/integration-tests/s3/tests/body_size_hint.rs +++ b/aws/sdk/integration-tests/s3/tests/body_size_hint.rs @@ -12,7 +12,7 @@ use aws_sdk_s3::{ Client, }; use aws_smithy_http_client::test_util::{capture_request, infallible_client_fn}; -use http_body::Body; +use http_body_1x::Body; #[tokio::test] async fn download_body_size_hint_check() { @@ -25,7 +25,7 @@ async fn download_body_size_hint_check() { ); let http_client = infallible_client_fn(move |_| { - http::Response::builder() + http_1x::Response::builder() .status(200) .body((test_body)()) .unwrap() diff --git a/aws/sdk/integration-tests/s3/tests/checksums.rs b/aws/sdk/integration-tests/s3/tests/checksums.rs index a3bfa54c60..91bd0be817 100644 --- a/aws/sdk/integration-tests/s3/tests/checksums.rs +++ b/aws/sdk/integration-tests/s3/tests/checksums.rs @@ -14,8 +14,8 @@ use aws_sdk_s3::{operation::get_object::GetObjectOutput, types::ChecksumAlgorith use aws_sdk_s3::{Client, Config}; use aws_smithy_http_client::test_util::{capture_request, ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; -use http::header::AUTHORIZATION; -use http::{HeaderValue, Uri}; +use http_1x::header::AUTHORIZATION; +use http_1x::{HeaderValue, Uri}; use std::time::{Duration, UNIX_EPOCH}; use tracing_test::traced_test; @@ -27,7 +27,7 @@ fn new_checksum_validated_response_test_connection( checksum_header_value: &'static str, ) -> StaticReplayClient { StaticReplayClient::new(vec![ReplayEvent::new( - http::Request::builder() + http_1x::Request::builder() .header("x-amz-checksum-mode", "ENABLED") .header( "user-agent", @@ -48,7 +48,7 @@ fn new_checksum_validated_response_test_connection( )) .body(SdkBody::empty()) .unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("x-amz-request-id", "4B4NGF0EAWN0GE63") .header("content-length", "11") .header("etag", "\"3e25960a79dbc69b674cd4ec67a72c62\"") @@ -63,7 +63,7 @@ fn new_checksum_validated_response_test_connection( "kPl+IVVZAwsN8ePUyQJZ40WD9dzaqtr4eNESArqE68GSKtVvuvCTDe+SxhTT+JTUqXB1HL4OxNM=", ) .header("accept-ranges", "bytes") - .status(http::StatusCode::from_u16(200).unwrap()) + .status(http_1x::StatusCode::from_u16(200).unwrap()) .body(SdkBody::from(r#"Hello world"#)) .unwrap(), )]) @@ -343,7 +343,7 @@ async fn collect_body_into_string(body: aws_smithy_types::body::SdkBody) -> Stri async fn test_get_multipart_upload_part_checksum_validation() { let expected_checksum = "cpjwid==-12"; let (http_client, rcvr) = capture_request(Some( - http::Response::builder() + http_1x::Response::builder() .header("etag", "\"3e25960a79dbc69b674cd4ec67a72c62\"") .header("x-amz-checksum-crc32", expected_checksum) .body(SdkBody::empty()) @@ -390,7 +390,7 @@ async fn test_get_multipart_upload_part_checksum_validation() { async fn test_response_checksum_ignores_invalid_base64() { let expected_checksum = "{}{!!#{})!{)@$(}"; let (http_client, rcvr) = capture_request(Some( - http::Response::builder() + http_1x::Response::builder() .header("etag", "\"3e25960a79dbc69b674cd4ec67a72c62\"") .header("x-amz-checksum-crc32", expected_checksum) .body(SdkBody::empty()) diff --git a/aws/sdk/integration-tests/s3/tests/customizable-operation.rs b/aws/sdk/integration-tests/s3/tests/customizable-operation.rs index 64d304dd32..69f1c60076 100644 --- a/aws/sdk/integration-tests/s3/tests/customizable-operation.rs +++ b/aws/sdk/integration-tests/s3/tests/customizable-operation.rs @@ -8,7 +8,7 @@ use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::presigning::PresigningConfig; use aws_sdk_s3::{Client, Config}; use aws_smithy_http_client::test_util::capture_request; -use http::HeaderValue; +use http_1x::HeaderValue; use std::time::{Duration, SystemTime}; #[tokio::test] diff --git a/aws/sdk/integration-tests/s3/tests/expires_interceptor.rs b/aws/sdk/integration-tests/s3/tests/expires_interceptor.rs index eaa49b5e82..488b6d342f 100644 --- a/aws/sdk/integration-tests/s3/tests/expires_interceptor.rs +++ b/aws/sdk/integration-tests/s3/tests/expires_interceptor.rs @@ -11,13 +11,13 @@ use aws_smithy_types::date_time::{DateTime, Format}; fn make_client(expires_val: &str) -> Client { let http_client = StaticReplayClient::new(vec![ReplayEvent::new( - http::Request::builder() - .uri(http::Uri::from_static( + http_1x::Request::builder() + .uri(http_1x::Uri::from_static( "https://some-test-bucket.s3.us-east-1.amazonaws.com/test.txt?attributes", )) .body(SdkBody::empty()) .unwrap(), - http::Response::builder() + http_1x::Response::builder() .header("Expires", expires_val) .status(200) .body(SdkBody::empty()) diff --git a/aws/sdk/integration-tests/s3/tests/express.rs b/aws/sdk/integration-tests/s3/tests/express.rs index a278d65186..05267a180f 100644 --- a/aws/sdk/integration-tests/s3/tests/express.rs +++ b/aws/sdk/integration-tests/s3/tests/express.rs @@ -17,7 +17,7 @@ use aws_smithy_http_client::test_util::dvr::ReplayingClient; use aws_smithy_http_client::test_util::{capture_request, ReplayEvent, StaticReplayClient}; use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; use aws_smithy_types::endpoint::Endpoint; -use http::Uri; +use http_1x::Uri; async fn test_client(update_builder: F) -> Client where @@ -104,8 +104,8 @@ async fn mixed_auths() { .unwrap(); } -fn create_session_request() -> http::Request { - http::Request::builder() +fn create_session_request() -> http_1x::Request { + http_1x::Request::builder() .uri("https://s3express-test-bucket--usw2-az1--x-s3.s3express-usw2-az1.us-west-2.amazonaws.com/?session") .header("x-amz-create-session-mode", "ReadWrite") .method("GET") @@ -113,8 +113,8 @@ fn create_session_request() -> http::Request { .unwrap() } -fn create_session_response() -> http::Response { - http::Response::builder() +fn create_session_response() -> http_1x::Response { + http_1x::Response::builder() .status(200) .body(SdkBody::from( r#" @@ -187,8 +187,8 @@ async fn presigning() { fn operation_request_with_checksum( query: &str, kv: Option<(&str, &str)>, -) -> http::Request { - let mut b = http::Request::builder() +) -> http_1x::Request { + let mut b = http_1x::Request::builder() .uri(&format!("https://s3express-test-bucket--usw2-az1--x-s3.s3express-usw2-az1.us-west-2.amazonaws.com/{query}")) .method("GET"); if let Some((key, value)) = kv { @@ -197,8 +197,8 @@ fn operation_request_with_checksum( b.body(SdkBody::empty()).unwrap() } -fn response_ok() -> http::Response { - http::Response::builder() +fn response_ok() -> http_1x::Response { + http_1x::Response::builder() .status(200) .body(SdkBody::empty()) .unwrap() diff --git a/aws/sdk/integration-tests/s3/tests/identity-cache.rs b/aws/sdk/integration-tests/s3/tests/identity-cache.rs index e117e439da..7ad784bdd4 100644 --- a/aws/sdk/integration-tests/s3/tests/identity-cache.rs +++ b/aws/sdk/integration-tests/s3/tests/identity-cache.rs @@ -19,8 +19,12 @@ use aws_smithy_http_client::test_util::infallible_client_fn; #[tokio::test] async fn test_identity_cache_reused_by_default() { - let http_client = - infallible_client_fn(|_req| http::Response::builder().status(200).body("OK!").unwrap()); + let http_client = infallible_client_fn(|_req| { + http_1x::Response::builder() + .status(200) + .body("OK!") + .unwrap() + }); let provider = TestCredProvider::new(); let config = aws_config::defaults(BehaviorVersion::latest()) @@ -42,8 +46,12 @@ async fn test_identity_cache_reused_by_default() { #[allow(deprecated)] // intentionally testing an old behavior version #[tokio::test] async fn test_identity_cache_ga_behavior_version() { - let http_client = - infallible_client_fn(|_req| http::Response::builder().status(200).body("OK!").unwrap()); + let http_client = infallible_client_fn(|_req| { + http_1x::Response::builder() + .status(200) + .body("OK!") + .unwrap() + }); let provider = TestCredProvider::new(); diff --git a/aws/sdk/integration-tests/s3/tests/ignore-invalid-xml-body-root.rs b/aws/sdk/integration-tests/s3/tests/ignore-invalid-xml-body-root.rs index b4defc9f20..da92a5e867 100644 --- a/aws/sdk/integration-tests/s3/tests/ignore-invalid-xml-body-root.rs +++ b/aws/sdk/integration-tests/s3/tests/ignore-invalid-xml-body-root.rs @@ -16,16 +16,16 @@ const RESPONSE_BODY_XML: &[u8] = b"\n< #[tokio::test] async fn ignore_invalid_xml_body_root() { let http_client = StaticReplayClient::new(vec![ - ReplayEvent::new(http::Request::builder() + ReplayEvent::new(http_1x::Request::builder() .header("x-amz-object-attributes", "Checksum") .header("x-amz-user-agent", "aws-sdk-rust/0.123.test api/test-service/0.123 os/windows/XPSP3 lang/rust/1.50.0") .header("x-amz-date", "20090213T233130Z") .header("authorization", "AWS4-HMAC-SHA256 Credential=ANOTREAL/20210618/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-object-attributes;x-amz-security-token;x-amz-user-agent, Signature=0e6ec749db5a0af07890a83f553319eda95be0e498d058c64880471a474c5378") .header("x-amz-content-sha256", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") - .uri(http::Uri::from_static("https://some-test-bucket.s3.us-east-1.amazonaws.com/test.txt?attributes")) + .uri(http_1x::Uri::from_static("https://some-test-bucket.s3.us-east-1.amazonaws.com/test.txt?attributes")) .body(SdkBody::empty()) .unwrap(), - http::Response::builder() + http_1x::Response::builder() .header( "x-amz-id-2", "rbipIUyF3YKPIcqpz6hrP9x9mzYMSqkHzDEp6TEN/STcKvylDIE/LLN6x9t6EKJRrgctNsdNHWk=", diff --git a/aws/sdk/integration-tests/s3/tests/interceptors.rs b/aws/sdk/integration-tests/s3/tests/interceptors.rs index c6ac0553fa..97a302cc84 100644 --- a/aws/sdk/integration-tests/s3/tests/interceptors.rs +++ b/aws/sdk/integration-tests/s3/tests/interceptors.rs @@ -11,8 +11,8 @@ use aws_smithy_runtime_api::box_error::BoxError; use aws_smithy_runtime_api::client::interceptors::Intercept; use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; use aws_smithy_types::config_bag::{ConfigBag, Layer, Storable, StoreReplace}; -use http::header::USER_AGENT; -use http::HeaderValue; +use http_1x::header::USER_AGENT; +use http_1x::HeaderValue; #[tokio::test] async fn interceptor_priority() { diff --git a/aws/sdk/integration-tests/s3/tests/naughty-string-metadata.rs b/aws/sdk/integration-tests/s3/tests/naughty-string-metadata.rs index 30c0a0b83b..084f0d9a67 100644 --- a/aws/sdk/integration-tests/s3/tests/naughty-string-metadata.rs +++ b/aws/sdk/integration-tests/s3/tests/naughty-string-metadata.rs @@ -9,7 +9,7 @@ use aws_credential_types::provider::SharedCredentialsProvider; use aws_sdk_s3::Config; use aws_sdk_s3::{config::Credentials, config::Region, primitives::ByteStream, Client}; use aws_smithy_http_client::test_util::capture_request; -use http::HeaderValue; +use http_1x::HeaderValue; const NAUGHTY_STRINGS: &str = include_str!("blns/blns.txt"); diff --git a/aws/sdk/integration-tests/s3/tests/presigning.rs b/aws/sdk/integration-tests/s3/tests/presigning.rs index 768dd563bb..834568d92f 100644 --- a/aws/sdk/integration-tests/s3/tests/presigning.rs +++ b/aws/sdk/integration-tests/s3/tests/presigning.rs @@ -8,8 +8,8 @@ use std::collections::HashMap; use futures_util::future::FutureExt; use futures_util::Future; -use http::header::{CONTENT_LENGTH, CONTENT_TYPE}; -use http::Uri; +use http_1x::header::{CONTENT_LENGTH, CONTENT_TYPE}; +use http_1x::Uri; use s3::config::{Credentials, Region}; use s3::operation::get_object::builders::GetObjectFluentBuilder; use s3::operation::head_object::builders::HeadObjectFluentBuilder; diff --git a/aws/sdk/integration-tests/s3/tests/request_id.rs b/aws/sdk/integration-tests/s3/tests/request_id.rs index 5a806d7e1a..d38dbeb55f 100644 --- a/aws/sdk/integration-tests/s3/tests/request_id.rs +++ b/aws/sdk/integration-tests/s3/tests/request_id.rs @@ -12,7 +12,7 @@ use aws_smithy_types::body::SdkBody; #[tokio::test] async fn get_request_id_from_modeled_error() { let (http_client, request) = capture_request(Some( - http::Response::builder() + http_1x::Response::builder() .header("x-amz-request-id", "correct-request-id") .header("x-amz-id-2", "correct-extended-request-id") .status(404) @@ -62,7 +62,7 @@ async fn get_request_id_from_modeled_error() { #[allow(deprecated)] async fn get_request_id_from_unmodeled_error() { let (http_client, request) = capture_request(Some( - http::Response::builder() + http_1x::Response::builder() .header("x-amz-request-id", "correct-request-id") .header("x-amz-id-2", "correct-extended-request-id") .status(500) @@ -108,7 +108,7 @@ async fn get_request_id_from_unmodeled_error() { #[tokio::test] async fn get_request_id_from_successful_nonstreaming_response() { let (http_client, request) = capture_request(Some( - http::Response::builder() + http_1x::Response::builder() .header("x-amz-request-id", "correct-request-id") .header("x-amz-id-2", "correct-extended-request-id") .status(200) @@ -143,7 +143,7 @@ async fn get_request_id_from_successful_nonstreaming_response() { #[tokio::test] async fn get_request_id_from_successful_streaming_response() { let (http_client, request) = capture_request(Some( - http::Response::builder() + http_1x::Response::builder() .header("x-amz-request-id", "correct-request-id") .header("x-amz-id-2", "correct-extended-request-id") .status(200) @@ -175,7 +175,7 @@ async fn get_request_id_from_successful_streaming_response() { #[tokio::test] async fn conversion_to_service_error_maintains_request_id() { let (http_client, request) = capture_request(Some( - http::Response::builder() + http_1x::Response::builder() .header("x-amz-request-id", "correct-request-id") .header("x-amz-id-2", "correct-extended-request-id") .status(404) diff --git a/aws/sdk/integration-tests/s3/tests/retry-classifier-customization.rs b/aws/sdk/integration-tests/s3/tests/retry-classifier-customization.rs index 4a7eaeb50f..c66f68a153 100644 --- a/aws/sdk/integration-tests/s3/tests/retry-classifier-customization.rs +++ b/aws/sdk/integration-tests/s3/tests/retry-classifier-customization.rs @@ -51,21 +51,21 @@ impl ClassifyRetry for CustomizationTestClassifier { } } -fn req() -> http::Request { - http::Request::builder() +fn req() -> http_1x::Request { + http_1x::Request::builder() .body(SdkBody::from("request body")) .unwrap() } -fn ok() -> http::Response { - http::Response::builder() +fn ok() -> http_1x::Response { + http_1x::Response::builder() .status(200) .body(SdkBody::from("Hello!")) .unwrap() } -fn err() -> http::Response { - http::Response::builder() +fn err() -> http_1x::Response { + http_1x::Response::builder() .status(500) .body(SdkBody::from("This was an error")) .unwrap() diff --git a/aws/sdk/integration-tests/s3/tests/signing-it.rs b/aws/sdk/integration-tests/s3/tests/signing-it.rs index 2566fa21b8..81989c70e4 100644 --- a/aws/sdk/integration-tests/s3/tests/signing-it.rs +++ b/aws/sdk/integration-tests/s3/tests/signing-it.rs @@ -10,17 +10,17 @@ use aws_sdk_s3::config::{Credentials, Region}; use aws_sdk_s3::{Client, Config}; use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; -use http::header::AUTHORIZATION; +use http_1x::header::AUTHORIZATION; #[tokio::test] async fn test_signer() { let http_client = StaticReplayClient::new(vec![ReplayEvent::new( - http::Request::builder() + http_1x::Request::builder() .header("authorization", "AWS4-HMAC-SHA256 Credential=ANOTREAL/20090213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-user-agent, Signature=27e3f59ec3cffaa10e4f1c92112e8fb62d468a04cd32be39e68215f830404dbb") .uri("https://test-bucket.s3.us-east-1.amazonaws.com/?list-type=2&prefix=prefix~") .body(SdkBody::empty()) .unwrap(), - http::Response::builder().status(200).body(SdkBody::empty()).unwrap(), + http_1x::Response::builder().status(200).body(SdkBody::empty()).unwrap(), )]); let config = Config::builder() .credentials_provider(SharedCredentialsProvider::new( diff --git a/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs b/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs index a4a5a71df4..03eb31635f 100644 --- a/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs +++ b/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs @@ -13,7 +13,7 @@ use aws_sdk_s3::{Client, Config}; use aws_smithy_runtime::{assert_str_contains, test_util::capture_test_logs::capture_test_logs}; use aws_smithy_types::body::SdkBody; use bytes::{Bytes, BytesMut}; -use http_body::Body; +use http_body_1x::Body; use std::error::Error; use std::time::Duration; use std::{future::Future, task::Poll}; @@ -49,7 +49,7 @@ impl Body for SlowBody { fn poll_frame( mut self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll, Self::Error>>> { + ) -> Poll, Self::Error>>> { loop { let mut state = SlowBodyState::Taken; std::mem::swap(&mut state, &mut self.state); @@ -63,7 +63,7 @@ impl Body for SlowBody { }, SlowBodyState::Send => { self.state = SlowBodyState::Wait(Box::pin(sleep(Duration::from_micros(100)))); - return Poll::Ready(Some(Ok(http_body::Frame::data(Bytes::from_static( + return Poll::Ready(Some(Ok(http_body_1x::Frame::data(Bytes::from_static( b"data_data_data_data_data_data_data_data_data_data_data_data_\ data_data_data_data_data_data_data_data_data_data_data_data_\ data_data_data_data_data_data_data_data_data_data_data_data_\ diff --git a/aws/sdk/integration-tests/s3/tests/status-200-errors.rs b/aws/sdk/integration-tests/s3/tests/status-200-errors.rs index 7aaa05a2af..2febaee6a8 100644 --- a/aws/sdk/integration-tests/s3/tests/status-200-errors.rs +++ b/aws/sdk/integration-tests/s3/tests/status-200-errors.rs @@ -26,7 +26,7 @@ const ERROR_RESPONSE: &str = r#" #[tokio::test] async fn status_200_errors() { let http_client = - infallible_client_fn(|_req| http::Response::new(SdkBody::from(ERROR_RESPONSE))); + infallible_client_fn(|_req| http_1x::Response::new(SdkBody::from(ERROR_RESPONSE))); let sdk_config = SdkConfig::builder() .credentials_provider(SharedCredentialsProvider::new(Credentials::for_tests())) .region(Region::new("us-west-4")) @@ -47,7 +47,7 @@ async fn status_200_errors() { #[tokio::test] async fn retry_200_internal_error() { let http_client = infallible_client_fn(|_req| { - http::Response::new(SdkBody::from( + http_1x::Response::new(SdkBody::from( r#" Server diff --git a/aws/sdk/integration-tests/s3/tests/streaming-response.rs b/aws/sdk/integration-tests/s3/tests/streaming-response.rs index 2f7d3dfd78..819b417d18 100644 --- a/aws/sdk/integration-tests/s3/tests/streaming-response.rs +++ b/aws/sdk/integration-tests/s3/tests/streaming-response.rs @@ -12,7 +12,7 @@ use aws_smithy_http_client::test_util::infallible_client_fn; use aws_smithy_runtime::assert_str_contains; use aws_smithy_types::body::SdkBody; use bytes::BytesMut; -use http::header::CONTENT_LENGTH; +use http_1x::header::CONTENT_LENGTH; use std::future::Future; use std::net::SocketAddr; use std::time::Duration; @@ -24,7 +24,7 @@ async fn test_too_short_body_causes_an_error() { // in its own async runtime. But there's no reason a customer couldn't run their _own_ HttpClient // that was more poorly behaved, so we'll do that here. let http_client = infallible_client_fn(|_req| { - http::Response::builder() + http_1x::Response::builder() .header(CONTENT_LENGTH, 5000) .body(SdkBody::from("definitely not 5000 characters")) .unwrap() diff --git a/aws/sdk/integration-tests/s3control/Cargo.toml b/aws/sdk/integration-tests/s3control/Cargo.toml index 92b604f29c..7fd9f17edf 100644 --- a/aws/sdk/integration-tests/s3control/Cargo.toml +++ b/aws/sdk/integration-tests/s3control/Cargo.toml @@ -23,7 +23,7 @@ aws-smithy-http-client = { path = "../../build/aws-sdk/sdk/aws-smithy-http-clien aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } aws-types = { path = "../../build/aws-sdk/sdk/aws-types" } bytes = "1.0.0" -http = "1" +http-1x = { package = "http", version = "1" } serde_json = "1.0.0" tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/s3control/tests/signing-it.rs b/aws/sdk/integration-tests/s3control/tests/signing-it.rs index b137aa6f68..d6548e4314 100644 --- a/aws/sdk/integration-tests/s3control/tests/signing-it.rs +++ b/aws/sdk/integration-tests/s3control/tests/signing-it.rs @@ -8,12 +8,12 @@ use aws_sdk_s3control::config::{Credentials, Region}; use aws_sdk_s3control::{Client, Config}; use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient}; use aws_smithy_types::body::SdkBody; -use http::header::AUTHORIZATION; +use http_1x::header::AUTHORIZATION; #[tokio::test] async fn test_signer() { let http_client = StaticReplayClient::new(vec![ReplayEvent::new( - http::Request::builder() + http_1x::Request::builder() .header("authorization", "AWS4-HMAC-SHA256 Credential=ANOTREAL/20090213/us-east-1/s3/aws4_request, \ SignedHeaders=host;x-amz-account-id;x-amz-content-sha256;x-amz-date;x-amz-user-agent, \ @@ -21,7 +21,7 @@ async fn test_signer() { .uri("https://test-bucket.s3-control.us-east-1.amazonaws.com/v20180820/accesspoint") .body(SdkBody::empty()) .unwrap(), - http::Response::builder().status(200).body(SdkBody::empty()).unwrap(), + http_1x::Response::builder().status(200).body(SdkBody::empty()).unwrap(), )]); let config = Config::builder() .credentials_provider(SharedCredentialsProvider::new( diff --git a/aws/sdk/integration-tests/transcribestreaming/Cargo.toml b/aws/sdk/integration-tests/transcribestreaming/Cargo.toml index da498c5893..a0e3de9cd9 100644 --- a/aws/sdk/integration-tests/transcribestreaming/Cargo.toml +++ b/aws/sdk/integration-tests/transcribestreaming/Cargo.toml @@ -18,7 +18,7 @@ aws-smithy-http-client= { path = "../../build/aws-sdk/sdk/aws-smithy-http-client bytes = "1.0.0" futures-core = "0.3.29" hound = "3.4.0" -http = "1" +http-1x = { package = "http", version = "1" } serde_json = "1.0.0" tokio = { version = "1.23.1", features = ["full", "test-util"] } tracing = "0.1" diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt index 1c148eba49..df67c2e183 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt @@ -346,7 +346,7 @@ data class CargoDependency( val HyperWithStream: CargoDependency = Hyper.withFeature("stream") // Hyper 1.x types - val Http1x: CargoDependency = CargoDependency("http-1x", CratesIo("1"), `package` = "http", optional = true) + val Http1x: CargoDependency = CargoDependency("http-1x", CratesIo("1"), `package` = "http") val HttpBody1x: CargoDependency = CargoDependency("http-body-1x", CratesIo("1"), `package` = "http-body", optional = true) @@ -362,9 +362,7 @@ data class CargoDependency( fun smithyHttp(runtimeConfig: RuntimeConfig) = runtimeConfig.smithyRuntimeCrate("smithy-http") - fun smithyHttpClient(runtimeConfig: RuntimeConfig) = - runtimeConfig.smithyRuntimeCrate("smithy-http-client") - .withFeature("crypto-ring") + fun smithyHttpClient(runtimeConfig: RuntimeConfig) = runtimeConfig.smithyRuntimeCrate("smithy-http-client") fun smithyJson(runtimeConfig: RuntimeConfig) = runtimeConfig.smithyRuntimeCrate("smithy-json") diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index 5643f268d5..4c2499583c 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -2013,6 +2013,7 @@ dependencies = [ "bytes", "fastrand", "futures-util", + "http 0.2.12", "http 1.1.0", "http-body 0.4.6", "md-5", diff --git a/rust-runtime/aws-smithy-types/Cargo.toml b/rust-runtime/aws-smithy-types/Cargo.toml index 3fd9186d0f..e98a16d323 100644 --- a/rust-runtime/aws-smithy-types/Cargo.toml +++ b/rust-runtime/aws-smithy-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-types" -version = "1.2.8" +version = "1.3.0" authors = [ "AWS Rust SDK Team ", "Russell Cohen ", diff --git a/rust-runtime/inlineable/Cargo.toml b/rust-runtime/inlineable/Cargo.toml index 157c674a38..3770a731a3 100644 --- a/rust-runtime/inlineable/Cargo.toml +++ b/rust-runtime/inlineable/Cargo.toml @@ -28,7 +28,9 @@ aws-smithy-xml = { path = "../aws-smithy-xml" } bytes = "1" fastrand = "2.0.0" futures-util = "0.3.29" -http = "1" +# FIXME(hyper1) - due to the way codegen generates crate dependencies right now we have to match the codegen names used for theses +http-1x = { package = "http", version = "1" } +http = { package = "http", version = "0.2.9" } http-body = "0.4" md-5 = "0.10.0" once_cell = "1.16.0" diff --git a/rust-runtime/inlineable/src/serialization_settings.rs b/rust-runtime/inlineable/src/serialization_settings.rs index 7a77f87b6b..c21de5731e 100644 --- a/rust-runtime/inlineable/src/serialization_settings.rs +++ b/rust-runtime/inlineable/src/serialization_settings.rs @@ -5,9 +5,8 @@ #![allow(dead_code)] -use aws_smithy_http::header::set_request_header_if_absent; use aws_smithy_types::config_bag::{Storable, StoreReplace}; -use http_1x::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE}; +use http::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE}; /// Configuration for how default protocol headers are serialized #[derive(Clone, Debug, Default)] @@ -47,12 +46,19 @@ impl HeaderSerializationSettings { /// Sets a default header on the given request builder if it should be serialized pub(crate) fn set_default_header( &self, - mut request: http_1x::request::Builder, + mut request: http::request::Builder, header_name: HeaderName, value: &str, - ) -> http_1x::request::Builder { + ) -> http::request::Builder { if self.include_header(&header_name) { - request = set_request_header_if_absent(request, header_name, value); + // TODO(hyper1) - revert back to use aws_smithy_http::header::set_request_header_if_absent once codegen is on http_1x types + if !request + .headers_ref() + .map(|map| map.contains_key(&header_name)) + .unwrap_or(false) + { + request = request.header(header_name, value) + } } request } From d2af1eba256703d6269e5ea48f1db47c365a9ee1 Mon Sep 17 00:00:00 2001 From: Aaron Todd Date: Wed, 30 Oct 2024 16:53:17 +0000 Subject: [PATCH 06/11] fix adhoc tests --- .../smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt index 7d13d1bf75..fc47ab5f71 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt @@ -42,6 +42,7 @@ private class ApiGatewayAcceptHeaderInterceptorCustomization(private val codegen additionalDependency = arrayOf( CargoDependency.smithyRuntimeApiClient(codegenContext.runtimeConfig), + CargoDependency.Http1x, ), ), ).resolve("AcceptHeaderInterceptor"), From 249da374eb4120288129dd35df3a1ec2f627df37 Mon Sep 17 00:00:00 2001 From: Aaron Todd Date: Wed, 30 Oct 2024 19:23:57 +0000 Subject: [PATCH 07/11] fix ci --- aws/rust-runtime/Cargo.lock | 4 ++-- aws/rust-runtime/aws-sigv4/src/http_request/sign.rs | 2 +- rust-runtime/aws-smithy-http/Cargo.toml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/aws/rust-runtime/Cargo.lock b/aws/rust-runtime/Cargo.lock index a4cfff2689..a6b298723a 100644 --- a/aws/rust-runtime/Cargo.lock +++ b/aws/rust-runtime/Cargo.lock @@ -144,7 +144,7 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.4.4" +version = "1.5.0" dependencies = [ "arbitrary", "aws-credential-types", @@ -357,7 +357,7 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.8" +version = "1.3.0" dependencies = [ "base64-simd", "bytes", diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs index c4dae432a0..7e97b5195d 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs @@ -206,7 +206,7 @@ impl SigningInstructions { } if !new_query.is_empty() { - let mut query = aws_smithy_http::query_writer::QueryWriter::new(&request.uri()); + let mut query = aws_smithy_http::query_writer::QueryWriter::new(request.uri()); for (name, value) in new_query { query.insert(name, &value); } diff --git a/rust-runtime/aws-smithy-http/Cargo.toml b/rust-runtime/aws-smithy-http/Cargo.toml index 308718ef8f..39857a2f4d 100644 --- a/rust-runtime/aws-smithy-http/Cargo.toml +++ b/rust-runtime/aws-smithy-http/Cargo.toml @@ -17,7 +17,8 @@ compat = ["dep:http-02x"] [dependencies] aws-smithy-eventstream = { path = "../aws-smithy-eventstream", optional = true } -aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["client", "http-1x"] } +# FIXME(hyper1) - _somewhere_ in codegen relies on http-02x feature enabled via this crate, find and fix +aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["client", "http-1x", "http-02x"] } aws-smithy-types = { path = "../aws-smithy-types", features = ["byte-stream-poll-next", "http-body-0-4-x"] } bytes = "1" bytes-utils = "0.1" From b8513e9112fd87550f0af9f536dc17d97db464b1 Mon Sep 17 00:00:00 2001 From: Aaron J Todd Date: Thu, 7 Nov 2024 12:02:06 -0500 Subject: [PATCH 08/11] fix versions --- aws/rust-runtime/Cargo.lock | 4 +- rust-runtime/Cargo.lock | 68 +++++++++---------- rust-runtime/aws-smithy-http/Cargo.toml | 4 +- .../aws-smithy-runtime-api/Cargo.toml | 2 +- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/aws/rust-runtime/Cargo.lock b/aws/rust-runtime/Cargo.lock index a6b298723a..53d56cdd6c 100644 --- a/aws/rust-runtime/Cargo.lock +++ b/aws/rust-runtime/Cargo.lock @@ -263,7 +263,7 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.70.0" +version = "0.62.0" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.7.3" +version = "1.7.4" dependencies = [ "aws-smithy-async", "aws-smithy-types", diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index 4c2499583c..4f75cfac1a 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -309,7 +309,7 @@ dependencies = [ name = "aws-smithy-cbor" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.8", + "aws-smithy-types 1.3.0", "criterion", "minicbor", ] @@ -339,8 +339,8 @@ dependencies = [ name = "aws-smithy-checksums" version = "0.70.0" dependencies = [ - "aws-smithy-http 0.70.0", - "aws-smithy-types 1.2.8", + "aws-smithy-http 0.62.0", + "aws-smithy-types 1.3.0", "bytes", "bytes-utils", "crc32c", @@ -367,8 +367,8 @@ version = "0.60.3" name = "aws-smithy-compression" version = "0.0.2" dependencies = [ - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.8", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "bytes-utils", "flate2", @@ -389,7 +389,7 @@ name = "aws-smithy-eventstream" version = "0.60.5" dependencies = [ "arbitrary", - "aws-smithy-types 1.2.8", + "aws-smithy-types 1.3.0", "bytes", "bytes-utils", "crc32fast", @@ -434,12 +434,12 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.70.0" +version = "0.62.0" dependencies = [ "async-stream", "aws-smithy-eventstream 0.60.5", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.8", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "bytes-utils", "futures-core", @@ -468,8 +468,8 @@ version = "1.0.0" dependencies = [ "aws-smithy-async 1.2.1", "aws-smithy-protocol-test 0.63.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.8", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "h2 0.4.6", "http 0.2.12", @@ -499,10 +499,10 @@ name = "aws-smithy-http-server" version = "0.63.3" dependencies = [ "aws-smithy-cbor", - "aws-smithy-http 0.70.0", + "aws-smithy-http 0.62.0", "aws-smithy-json 0.60.7", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.8", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-smithy-xml 0.60.9", "bytes", "futures-util", @@ -529,10 +529,10 @@ dependencies = [ name = "aws-smithy-http-server-python" version = "0.63.2" dependencies = [ - "aws-smithy-http 0.70.0", + "aws-smithy-http 0.62.0", "aws-smithy-http-server", "aws-smithy-json 0.60.7", - "aws-smithy-types 1.2.8", + "aws-smithy-types 1.3.0", "aws-smithy-xml 0.60.9", "bytes", "futures", @@ -572,7 +572,7 @@ version = "0.60.3" name = "aws-smithy-json" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.8", + "aws-smithy-types 1.3.0", "proptest", "serde_json", ] @@ -591,8 +591,8 @@ name = "aws-smithy-mocks-experimental" version = "0.2.1" dependencies = [ "aws-sdk-s3", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.8", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "tokio", ] @@ -601,7 +601,7 @@ name = "aws-smithy-protocol-test" version = "0.63.0" dependencies = [ "assert-json-diff", - "aws-smithy-runtime-api 1.7.3", + "aws-smithy-runtime-api 1.7.4", "base64-simd", "cbor-diag", "ciborium", @@ -636,7 +636,7 @@ dependencies = [ name = "aws-smithy-query" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.8", + "aws-smithy-types 1.3.0", "urlencoding", ] @@ -678,10 +678,10 @@ version = "1.8.0" dependencies = [ "approx", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.70.0", + "aws-smithy-http 0.62.0", "aws-smithy-http-client", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.8", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "fastrand", "futures-util", @@ -720,10 +720,10 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.7.3" +version = "1.7.4" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.8", + "aws-smithy-types 1.3.0", "bytes", "http 0.2.12", "http 1.1.0", @@ -762,7 +762,7 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.8" +version = "1.3.0" dependencies = [ "base64 0.13.1", "base64-simd", @@ -799,7 +799,7 @@ name = "aws-smithy-types-convert" version = "0.60.8" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.8", + "aws-smithy-types 1.3.0", "chrono", "futures-core", "time", @@ -809,9 +809,9 @@ dependencies = [ name = "aws-smithy-wasm" version = "0.1.3" dependencies = [ - "aws-smithy-http 0.70.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.8", + "aws-smithy-http 0.62.0", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "http 1.1.0", "tracing", @@ -2004,11 +2004,11 @@ version = "0.1.0" dependencies = [ "aws-smithy-cbor", "aws-smithy-compression", - "aws-smithy-http 0.70.0", + "aws-smithy-http 0.62.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.8", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-smithy-xml 0.60.9", "bytes", "fastrand", diff --git a/rust-runtime/aws-smithy-http/Cargo.toml b/rust-runtime/aws-smithy-http/Cargo.toml index 39857a2f4d..4c6b7f95f6 100644 --- a/rust-runtime/aws-smithy-http/Cargo.toml +++ b/rust-runtime/aws-smithy-http/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-http" -version = "0.70.0" +version = "0.62.0" authors = [ "AWS Rust SDK Team ", "Russell Cohen ", @@ -24,7 +24,7 @@ bytes = "1" bytes-utils = "0.1" http-1x = { package = "http", version = "1" } http-02x = { package = "http", version = "0.2.9", optional = true } -# TODO(hyper1) - remove in favor of http-body-1x with breaking 0.70 change +# TODO(hyper1) - remove in favor of http-body-1x with breaking 0.62 change http-body-04x = { package = "http-body", version = "0.4.4" } http-body-1x = { package = "http-body", version = "1" } once_cell = "1.10" diff --git a/rust-runtime/aws-smithy-runtime-api/Cargo.toml b/rust-runtime/aws-smithy-runtime-api/Cargo.toml index b43ba312fa..a26693d4c4 100644 --- a/rust-runtime/aws-smithy-runtime-api/Cargo.toml +++ b/rust-runtime/aws-smithy-runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-runtime-api" -version = "1.7.3" +version = "1.7.4" authors = ["AWS Rust SDK Team ", "Zelda Hessler "] description = "Smithy runtime types." edition = "2021" From 7102aadbfe61bbc59278434bb111dbe7d4956365 Mon Sep 17 00:00:00 2001 From: Aaron J Todd Date: Thu, 7 Nov 2024 14:21:11 -0500 Subject: [PATCH 09/11] revert http 1.x upgrade to aws-smithy-http crate --- aws/rust-runtime/Cargo.lock | 380 +++++-- aws/rust-runtime/aws-config/Cargo.lock | 361 +++++-- aws/rust-runtime/aws-inlineable/Cargo.toml | 11 +- .../src/apigateway_interceptors.rs | 4 +- .../src/glacier_interceptors.rs | 2 +- .../src/http_request_checksum.rs | 14 +- .../src/http_response_checksum.rs | 2 +- .../aws-inlineable/src/s3_request_id.rs | 7 +- aws/rust-runtime/aws-runtime/Cargo.toml | 1 - .../aws-runtime/src/content_encoding.rs | 11 +- aws/rust-runtime/aws-runtime/src/lib.rs | 2 +- aws/rust-runtime/aws-sigv4/Cargo.toml | 10 +- .../aws-sigv4/src/http_request.rs | 2 +- .../src/http_request/canonical_request.rs | 16 +- .../aws-sigv4/src/http_request/error.rs | 4 +- .../aws-sigv4/src/http_request/settings.rs | 2 +- .../aws-sigv4/src/http_request/sign.rs | 70 +- .../aws-sigv4/src/http_request/test.rs | 10 +- .../rustsdk/HttpRequestChecksumDecorator.kt | 2 +- aws/sdk/Cargo.lock | 943 +++++++++++------- rust-runtime/Cargo.lock | 513 +++++++--- rust-runtime/aws-smithy-checksums/Cargo.toml | 9 +- .../src/body/calculate.rs | 104 +- .../aws-smithy-checksums/src/body/validate.rs | 40 +- rust-runtime/aws-smithy-http/Cargo.toml | 9 +- rust-runtime/aws-smithy-http/src/compat.rs | 206 ---- rust-runtime/aws-smithy-http/src/header.rs | 32 +- rust-runtime/aws-smithy-http/src/label.rs | 2 +- rust-runtime/aws-smithy-http/src/lib.rs | 5 - rust-runtime/aws-smithy-http/src/query.rs | 2 +- .../aws-smithy-http/src/query_writer.rs | 6 +- .../src/http/request.rs | 7 - rust-runtime/aws-smithy-runtime/Cargo.toml | 2 +- .../src/body/http_body_1_x.rs | 2 - rust-runtime/inlineable/Cargo.toml | 4 +- 35 files changed, 1788 insertions(+), 1009 deletions(-) delete mode 100644 rust-runtime/aws-smithy-http/src/compat.rs diff --git a/aws/rust-runtime/Cargo.lock b/aws/rust-runtime/Cargo.lock index 53d56cdd6c..5701bd6a86 100644 --- a/aws/rust-runtime/Cargo.lock +++ b/aws/rust-runtime/Cargo.lock @@ -40,15 +40,15 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" [[package]] name = "assert-json-diff" @@ -69,7 +69,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -235,7 +235,7 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.70.0" +version = "0.60.13" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -243,8 +243,8 @@ dependencies = [ "crc32c", "crc32fast", "hex", - "http 1.1.0", - "http-body 1.0.1", + "http 0.2.12", + "http-body 0.4.6", "md-5", "pin-project-lite", "sha1", @@ -273,7 +273,6 @@ dependencies = [ "http 0.2.12", "http 1.1.0", "http-body 0.4.6", - "http-body 1.0.1", "once_cell", "percent-encoding", "pin-project-lite", @@ -534,9 +533,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" dependencies = [ "jobserver", "libc", @@ -809,6 +808,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ecdsa" version = "0.14.8" @@ -1039,9 +1049,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "allocator-api2", "equivalent", @@ -1190,14 +1200,143 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1262,9 +1401,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libfuzzer-sys" @@ -1279,9 +1418,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" @@ -1289,6 +1428,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -1513,9 +1658,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1612,9 +1757,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -1724,9 +1869,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -1824,9 +1969,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ "bitflags", "errno", @@ -1981,22 +2126,22 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac55e59090389fb9f0dd9e0f3c09615afed1d19094284d0b200441f13550793" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be4f245ce16bc58d57ef2716271d0d4519e0f6defa147f6e081005bcb278ff" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2108,6 +2253,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "subtle" version = "2.6.1" @@ -2127,15 +2278,26 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "tempfile" version = "3.13.0" @@ -2151,22 +2313,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2209,6 +2371,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -2236,9 +2408,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -2260,7 +2432,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2311,7 +2483,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2371,7 +2543,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2392,27 +2564,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -2427,15 +2584,27 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.11.0" @@ -2516,7 +2685,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -2538,7 +2707,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2678,6 +2847,18 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xmlparser" version = "0.13.6" @@ -2690,6 +2871,30 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2708,7 +2913,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -2716,3 +2942,25 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] diff --git a/aws/rust-runtime/aws-config/Cargo.lock b/aws/rust-runtime/aws-config/Cargo.lock index 73daf5e1f4..1af306ae86 100644 --- a/aws/rust-runtime/aws-config/Cargo.lock +++ b/aws/rust-runtime/aws-config/Cargo.lock @@ -96,7 +96,7 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.4.3" +version = "1.5.0" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -180,7 +180,7 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.5" +version = "1.3.0" dependencies = [ "aws-credential-types", "aws-smithy-http", @@ -210,16 +210,16 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.70.0" +version = "0.62.0" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "bytes-utils", "futures-core", + "http 0.2.12", "http 1.1.0", "http-body 0.4.6", - "http-body 1.0.1", "once_cell", "percent-encoding", "pin-project-lite", @@ -311,7 +311,7 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.7.3" +version = "1.7.4" dependencies = [ "aws-smithy-async", "aws-smithy-types", @@ -326,7 +326,7 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.8" +version = "1.3.0" dependencies = [ "base64-simd", "bytes", @@ -456,9 +456,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" dependencies = [ "shlex", ] @@ -578,6 +578,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "either" version = "1.13.0" @@ -739,9 +750,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "hermit-abi" @@ -873,14 +884,143 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -908,9 +1048,15 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" + +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" [[package]] name = "lock_api" @@ -1099,9 +1245,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1151,9 +1297,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -1178,9 +1324,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -1376,22 +1522,22 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac55e59090389fb9f0dd9e0f3c09615afed1d19094284d0b200441f13550793" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be4f245ce16bc58d57ef2716271d0d4519e0f6defa147f6e081005bcb278ff" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -1473,6 +1619,12 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "subtle" version = "2.6.1" @@ -1492,33 +1644,44 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -1561,6 +1724,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -1578,9 +1751,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -1602,7 +1775,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -1653,7 +1826,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -1726,7 +1899,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -1741,27 +1914,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "untrusted" version = "0.9.0" @@ -1770,9 +1928,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -1785,6 +1943,18 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.11.0" @@ -1934,6 +2104,18 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xmlparser" version = "0.13.6" @@ -1946,8 +2128,75 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] diff --git a/aws/rust-runtime/aws-inlineable/Cargo.toml b/aws/rust-runtime/aws-inlineable/Cargo.toml index 43449c2249..07a00c99a1 100644 --- a/aws/rust-runtime/aws-inlineable/Cargo.toml +++ b/aws/rust-runtime/aws-inlineable/Cargo.toml @@ -12,7 +12,7 @@ publish = false repository = "https://github.com/smithy-lang/smithy-rs" [features] -http_1x = ["dep:http-body-1x", "aws-smithy-runtime-api/http-1x"] +http_1x = ["dep:http-1x", "dep:http-body-1x", "aws-smithy-runtime-api/http-1x"] [dependencies] aws-credential-types = { path = "../aws-credential-types" } @@ -21,17 +21,16 @@ aws-sigv4 = { path = "../aws-sigv4" } aws-types = { path = "../aws-types" } aws-smithy-async = { path = "../../../rust-runtime/aws-smithy-async", features = ["rt-tokio"] } aws-smithy-checksums = { path = "../../../rust-runtime/aws-smithy-checksums" } -aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http", features = ["compat"] } +aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http" } aws-smithy-runtime = { path = "../../../rust-runtime/aws-smithy-runtime", features = ["client"] } aws-smithy-runtime-api = { path = "../../../rust-runtime/aws-smithy-runtime-api", features = ["client"] } -aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types", features = ["http-body-1-x"] } +aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types", features = ["http-body-0-4-x"] } bytes = "1" fastrand = "2.0.0" hex = "0.4.3" -# FIXME(hyper1) - due to the way codegen generates crate dependencies right now we have to match the codegen names used for theses -http = { package = "http", version = "0.2.9" } +http = "0.2.9" http-body = "0.4.5" -http-1x = { package = "http", version = "1" } +http-1x = { package = "http", version = "1", optional = true } http-body-1x = { package = "http-body", version = "1", optional = true } hmac = "0.12" lru = "0.12.5" diff --git a/aws/rust-runtime/aws-inlineable/src/apigateway_interceptors.rs b/aws/rust-runtime/aws-inlineable/src/apigateway_interceptors.rs index baeeb20b03..e7374eb672 100644 --- a/aws/rust-runtime/aws-inlineable/src/apigateway_interceptors.rs +++ b/aws/rust-runtime/aws-inlineable/src/apigateway_interceptors.rs @@ -10,8 +10,8 @@ use aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterce use aws_smithy_runtime_api::client::interceptors::Intercept; use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; use aws_smithy_types::config_bag::ConfigBag; -use http_1x::header::ACCEPT; -use http_1x::HeaderValue; +use http::header::ACCEPT; +use http::HeaderValue; /// Interceptor that adds an Accept header to API Gateway requests. #[derive(Debug, Default)] diff --git a/aws/rust-runtime/aws-inlineable/src/glacier_interceptors.rs b/aws/rust-runtime/aws-inlineable/src/glacier_interceptors.rs index c1efd459c2..d6a9541580 100644 --- a/aws/rust-runtime/aws-inlineable/src/glacier_interceptors.rs +++ b/aws/rust-runtime/aws-inlineable/src/glacier_interceptors.rs @@ -10,7 +10,7 @@ use std::fmt; use std::marker::PhantomData; use bytes::Bytes; -use http_1x::header::HeaderValue; +use http::header::HeaderValue; use ring::digest::{Context, Digest, SHA256}; use aws_runtime::auth::SigV4OperationSigningConfig; diff --git a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs index 45880ff44d..3e010068c6 100644 --- a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs +++ b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs @@ -22,7 +22,7 @@ use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; use aws_smithy_types::body::SdkBody; use aws_smithy_types::config_bag::{ConfigBag, Layer, Storable, StoreReplace}; use aws_smithy_types::error::operation::BuildError; -use http_1x::HeaderValue; +use http::HeaderValue; use http_body::Body; use std::{fmt, mem}; @@ -221,8 +221,6 @@ fn wrap_streaming_request_body_in_checksum_calculating_body( let aws_chunked_body_options = AwsChunkedBodyOptions::new(original_body_size, vec![trailer_len]); - let body = aws_smithy_http::compat::Http1toHttp04::new(body); - let body = AwsChunkedBody::new(body, aws_chunked_body_options); SdkBody::from_body_0_4(body) @@ -237,20 +235,20 @@ fn wrap_streaming_request_body_in_checksum_calculating_body( let headers = request.headers_mut(); headers.insert( - http_1x::header::HeaderName::from_static("x-amz-trailer"), + http::header::HeaderName::from_static("x-amz-trailer"), checksum_algorithm.into_impl().header_name(), ); headers.insert( - http_1x::header::CONTENT_LENGTH, + http::header::CONTENT_LENGTH, HeaderValue::from(encoded_content_length), ); headers.insert( - http_1x::header::HeaderName::from_static("x-amz-decoded-content-length"), + http::header::HeaderName::from_static("x-amz-decoded-content-length"), HeaderValue::from(original_body_size), ); headers.insert( - http_1x::header::CONTENT_ENCODING, + http::header::CONTENT_ENCODING, HeaderValue::from_str(AWS_CHUNKED) .map_err(BuildError::other) .expect("\"aws-chunked\" will always be a valid HeaderValue"), @@ -277,7 +275,7 @@ mod tests { async fn test_checksum_body_is_retryable() { let input_text = "Hello world"; let chunk_len_hex = format!("{:X}", input_text.len()); - let mut request: HttpRequest = http_1x::Request::builder() + let mut request: HttpRequest = http::Request::builder() .body(SdkBody::retryable(move || SdkBody::from(input_text))) .unwrap() .try_into() diff --git a/aws/rust-runtime/aws-inlineable/src/http_response_checksum.rs b/aws/rust-runtime/aws-inlineable/src/http_response_checksum.rs index 4f6f280a20..1236c9fe50 100644 --- a/aws/rust-runtime/aws-inlineable/src/http_response_checksum.rs +++ b/aws/rust-runtime/aws-inlineable/src/http_response_checksum.rs @@ -119,7 +119,7 @@ pub(crate) fn wrap_body_with_checksum_validator( use aws_smithy_checksums::body::validate; body.map(move |body| { - SdkBody::from_body_1_x(validate::ChecksumBody::new( + SdkBody::from_body_0_4(validate::ChecksumBody::new( body, checksum_algorithm.into_impl(), precalculated_checksum.clone(), diff --git a/aws/rust-runtime/aws-inlineable/src/s3_request_id.rs b/aws/rust-runtime/aws-inlineable/src/s3_request_id.rs index c916f11514..26cfa745e3 100644 --- a/aws/rust-runtime/aws-inlineable/src/s3_request_id.rs +++ b/aws/rust-runtime/aws-inlineable/src/s3_request_id.rs @@ -79,7 +79,7 @@ mod test { #[test] fn handle_missing_header() { let resp = - Response::try_from(http_1x::Response::builder().status(400).body("").unwrap()).unwrap(); + Response::try_from(http::Response::builder().status(400).body("").unwrap()).unwrap(); let mut builder = ErrorMetadata::builder().message("123"); builder = apply_extended_request_id(builder, resp.headers()); assert_eq!(builder.build().extended_request_id(), None); @@ -88,12 +88,11 @@ mod test { #[test] fn test_extended_request_id_sdk_error() { let without_extended_request_id = || { - Response::try_from(http_1x::Response::builder().body(SdkBody::empty()).unwrap()) - .unwrap() + Response::try_from(http::Response::builder().body(SdkBody::empty()).unwrap()).unwrap() }; let with_extended_request_id = || { Response::try_from( - http_1x::Response::builder() + http::Response::builder() .header("x-amz-id-2", "some-request-id") .body(SdkBody::empty()) .unwrap(), diff --git a/aws/rust-runtime/aws-runtime/Cargo.toml b/aws/rust-runtime/aws-runtime/Cargo.toml index c53770df65..b918456022 100644 --- a/aws/rust-runtime/aws-runtime/Cargo.toml +++ b/aws/rust-runtime/aws-runtime/Cargo.toml @@ -27,7 +27,6 @@ aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types" } aws-types = { path = "../aws-types" } bytes = "1.1" fastrand = "2.0.0" -# TODO(hyper1) - can we make these pre 1.x http crates optional dependencies assuming usage is internal? http-02x = { package = "http", version = "0.2.3" } http-body-04x = { package = "http-body", version = "0.4.5" } http-1x = { package = "http", version = "1.1.0", optional = true } diff --git a/aws/rust-runtime/aws-runtime/src/content_encoding.rs b/aws/rust-runtime/aws-runtime/src/content_encoding.rs index cabac80e2d..e16bd2cf0d 100644 --- a/aws/rust-runtime/aws-runtime/src/content_encoding.rs +++ b/aws/rust-runtime/aws-runtime/src/content_encoding.rs @@ -5,6 +5,7 @@ use bytes::{Bytes, BytesMut}; use http_02x::{HeaderMap, HeaderValue}; +use http_body_04x::{Body, SizeHint}; use pin_project_lite::pin_project; use std::pin::Pin; @@ -196,9 +197,9 @@ fn total_rendered_length_of_trailers(trailer_map: Option<&HeaderMap>) -> u64 { } } -impl http_body_04x::Body for AwsChunkedBody +impl Body for AwsChunkedBody where - Inner: http_body_04x::Body, + Inner: Body, { type Data = Bytes; type Error = aws_smithy_types::body::Error; @@ -295,8 +296,8 @@ where self.state == AwsChunkedBodyState::Closed } - fn size_hint(&self) -> http_body_04x::SizeHint { - http_body_04x::SizeHint::with_exact(self.encoded_length()) + fn size_hint(&self) -> SizeHint { + SizeHint::with_exact(self.encoded_length()) } } @@ -379,7 +380,7 @@ mod tests { } } - impl http_body_04x::Body for SputteringBody { + impl Body for SputteringBody { type Data = Bytes; type Error = aws_smithy_types::body::Error; diff --git a/aws/rust-runtime/aws-runtime/src/lib.rs b/aws/rust-runtime/aws-runtime/src/lib.rs index 594bc6cc30..3030866953 100644 --- a/aws/rust-runtime/aws-runtime/src/lib.rs +++ b/aws/rust-runtime/aws-runtime/src/lib.rs @@ -20,7 +20,7 @@ pub mod auth; /// AWS-specific content-encoding tools -#[cfg(any(feature = "http-02x", feature = "http-1x"))] +#[cfg(feature = "http-02x")] pub mod content_encoding; /// Supporting code for recursion detection in the AWS SDK. diff --git a/aws/rust-runtime/aws-sigv4/Cargo.toml b/aws/rust-runtime/aws-sigv4/Cargo.toml index b9a66921b2..1edc322518 100644 --- a/aws/rust-runtime/aws-sigv4/Cargo.toml +++ b/aws/rust-runtime/aws-sigv4/Cargo.toml @@ -10,9 +10,9 @@ repository = "https://github.com/smithy-lang/smithy-rs" [features] default = ["sign-http", "http1"] -http0-compat = ["dep:http-02x", "aws-smithy-runtime-api/http-02x"] -http1 = ["dep:http-1x"] -sign-http = ["dep:http-1x", "dep:percent-encoding", "dep:form_urlencoded"] +http0-compat = ["dep:http0"] +http1 = ["dep:http"] +sign-http = ["dep:http0", "dep:percent-encoding", "dep:form_urlencoded"] sign-eventstream = ["dep:aws-smithy-eventstream"] sigv4a = ["dep:p256", "dep:crypto-bigint", "dep:subtle", "dep:zeroize", "dep:ring"] @@ -26,8 +26,8 @@ bytes = "1" form_urlencoded = { version = "1.0", optional = true } hex = "0.4" hmac = "0.12" -http-02x = { package = "http", version = "0.2", optional = true } -http-1x = { package = "http", version = "1", optional = true } +http0 = { version = "0.2", optional = true, package = "http" } +http = { version = "1", optional = true } once_cell = "1.8" p256 = { version = "0.11", features = ["ecdsa"], optional = true } percent-encoding = { version = "2.1", optional = true } diff --git a/aws/rust-runtime/aws-sigv4/src/http_request.rs b/aws/rust-runtime/aws-sigv4/src/http_request.rs index 3e695f8cf0..2bd0c92903 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request.rs @@ -10,7 +10,6 @@ //! **Note**: This requires `http0-compat` to be enabled. //! //! ```rust -//! # use http_1x as http; //! # use aws_credential_types::Credentials; //! use aws_smithy_runtime_api::client::identity::Identity; //! # use aws_sigv4::http_request::SignableBody; @@ -18,6 +17,7 @@ //! fn test() -> Result<(), aws_sigv4::http_request::SigningError> { //! use aws_sigv4::http_request::{sign, SigningSettings, SigningParams, SignableRequest}; //! use aws_sigv4::sign::v4; +//! use http0; //! use std::time::SystemTime; //! //! // Set up information and settings for the signing diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs b/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs index bccb5936ad..03404276d9 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs @@ -15,8 +15,8 @@ use crate::http_request::{PercentEncodingMode, SigningSettings}; use crate::sign::v4::sha256_hex_string; use crate::SignatureVersion; use aws_smithy_http::query_writer::QueryWriter; -use http_1x::header::{AsHeaderName, HeaderName, HOST}; -use http_1x::{HeaderMap, HeaderValue, Uri}; +use http0::header::{AsHeaderName, HeaderName, HOST}; +use http0::{HeaderMap, HeaderValue, Uri}; use std::borrow::Cow; use std::cmp::Ordering; use std::fmt; @@ -640,7 +640,7 @@ mod tests { use aws_credential_types::Credentials; use aws_smithy_http::query_writer::QueryWriter; use aws_smithy_runtime_api::client::identity::Identity; - use http_1x::{HeaderValue, Uri}; + use http0::{HeaderValue, Uri}; use pretty_assertions::assert_eq; use proptest::{prelude::*, proptest}; use std::borrow::Cow; @@ -808,7 +808,7 @@ mod tests { #[test] fn test_tilde_in_uri() { - let req = http_1x::Request::builder() + let req = http0::Request::builder() .uri("https://s3.us-east-1.amazonaws.com/my-bucket?list-type=2&prefix=~objprefix&single&k=&unreserved=-_.~").body("").unwrap().into(); let req = SignableRequest::from(&req); let identity = Credentials::for_tests().into(); @@ -829,7 +829,7 @@ mod tests { query_writer.insert("list-type", "2"); query_writer.insert("prefix", &all_printable_ascii_chars); - let req = http_1x::Request::builder() + let req = http0::Request::builder() .uri(query_writer.build_uri()) .body("") .unwrap() @@ -877,7 +877,7 @@ mod tests { // It should exclude authorization, user-agent, x-amzn-trace-id headers from presigning #[test] fn non_presigning_header_exclusion() { - let request = http_1x::Request::builder() + let request = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("authorization", "test-authorization") .header("content-type", "application/xml") @@ -909,7 +909,7 @@ mod tests { // It should exclude authorization, user-agent, x-amz-user-agent, x-amzn-trace-id headers from presigning #[test] fn presigning_header_exclusion() { - let request = http_1x::Request::builder() + let request = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("authorization", "test-authorization") .header("content-type", "application/xml") @@ -958,7 +958,7 @@ mod tests { valid_input, ) ) { - let mut request_builder = http_1x::Request::builder() + let mut request_builder = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("content-type", "application/xml") .header("content-length", "0"); diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/error.rs b/aws/rust-runtime/aws-sigv4/src/http_request/error.rs index 4623f98129..6f53783ff8 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/error.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/error.rs @@ -3,8 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -use http_1x::header::{InvalidHeaderName, InvalidHeaderValue}; -use http_1x::uri::InvalidUri; +use http0::header::{InvalidHeaderName, InvalidHeaderValue}; +use http0::uri::InvalidUri; use std::error::Error; use std::fmt; diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/settings.rs b/aws/rust-runtime/aws-sigv4/src/http_request/settings.rs index 042abf5d1e..bc8409b807 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/settings.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/settings.rs @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -use http_1x::header::{AUTHORIZATION, USER_AGENT}; +use http0::header::{AUTHORIZATION, USER_AGENT}; use std::borrow::Cow; use std::time::Duration; diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs index 7e97b5195d..414570791d 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs @@ -14,7 +14,7 @@ use crate::sign::v4; #[cfg(feature = "sigv4a")] use crate::sign::v4a; use crate::{SignatureVersion, SigningOutput}; -use http_1x::Uri; +use http0::Uri; use std::borrow::Cow; use std::fmt::{Debug, Formatter}; use std::str; @@ -169,48 +169,48 @@ impl SigningInstructions { #[cfg(any(feature = "http0-compat", test))] /// Applies the instructions to the given `request`. - pub fn apply_to_request_http0x(self, request: &mut http_02x::Request) { + pub fn apply_to_request_http0x(self, request: &mut http0::Request) { let (new_headers, new_query) = self.into_parts(); for header in new_headers.into_iter() { - let mut value = http_02x::HeaderValue::from_str(&header.value).unwrap(); + let mut value = http0::HeaderValue::from_str(&header.value).unwrap(); value.set_sensitive(header.sensitive); request.headers_mut().insert(header.key, value); } if !new_query.is_empty() { - let mut query = aws_smithy_http::query_writer::QueryWriter::new_from_string( - &request.uri().to_string(), - ) - .expect("unreachable: URI is valid"); + let mut query = aws_smithy_http::query_writer::QueryWriter::new(request.uri()); for (name, value) in new_query { query.insert(name, &value); } - *request.uri_mut() = query - .build_uri() - .to_string() - .parse() - .expect("unreachable: URI is valid"); + *request.uri_mut() = query.build_uri(); } } #[cfg(any(feature = "http1", test))] /// Applies the instructions to the given `request`. - pub fn apply_to_request_http1x(self, request: &mut http_1x::Request) { + pub fn apply_to_request_http1x(self, request: &mut http::Request) { // TODO(https://github.com/smithy-lang/smithy-rs/issues/3367): Update query writer to reduce // allocations let (new_headers, new_query) = self.into_parts(); for header in new_headers.into_iter() { - let mut value = http_1x::HeaderValue::from_str(&header.value).unwrap(); + let mut value = http::HeaderValue::from_str(&header.value).unwrap(); value.set_sensitive(header.sensitive); request.headers_mut().insert(header.key, value); } if !new_query.is_empty() { - let mut query = aws_smithy_http::query_writer::QueryWriter::new(request.uri()); + let mut query = aws_smithy_http::query_writer::QueryWriter::new_from_string( + &request.uri().to_string(), + ) + .expect("unreachable: URI is valid"); for (name, value) in new_query { query.insert(name, &value); } - *request.uri_mut() = query.build_uri(); + *request.uri_mut() = query + .build_uri() + .to_string() + .parse() + .expect("unreachable: URI is valid"); } } } @@ -485,7 +485,7 @@ mod tests { }; use crate::sign::v4; use aws_credential_types::Credentials; - use http_1x::{HeaderValue, Request}; + use http0::{HeaderValue, Request}; use pretty_assertions::assert_eq; use proptest::proptest; use std::borrow::Cow; @@ -533,7 +533,7 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http1x(&mut signed); + out.output.apply_to_request_http0x(&mut signed); let expected = test::v4::test_signed_request("get-vanilla-query-order-key-case"); assert_req_eq!(expected, signed); @@ -589,7 +589,7 @@ mod tests { let out = sign(signable_req, ¶ms).unwrap(); // Sigv4a signatures are non-deterministic, so we can't compare the signature directly. out.output - .apply_to_request_http1x(&mut req.as_http_request()); + .apply_to_request_http0x(&mut req.as_http_request()); let creds = params.credentials().unwrap(); let signing_key = @@ -819,7 +819,7 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http1x(&mut signed); + out.output.apply_to_request_http0x(&mut signed); let expected = test::v4::test_signed_request(test); assert_req_eq!(expected, signed); @@ -851,7 +851,7 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http1x(&mut signed); + out.output.apply_to_request_http0x(&mut signed); let expected = test::v4::test_signed_request_query_params("get-vanilla-query-order-key-case"); @@ -871,7 +871,7 @@ mod tests { } .into(); - let original = http_1x::Request::builder() + let original = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("some-header", HeaderValue::from_str("テスト").unwrap()) .body("") @@ -885,9 +885,9 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http1x(&mut signed); + out.output.apply_to_request_http0x(&mut signed); - let expected = http_1x::Request::builder() + let expected = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header("some-header", HeaderValue::from_str("テスト").unwrap()) .header( @@ -925,7 +925,7 @@ mod tests { } .into(); - let original = http_1x::Request::builder() + let original = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .body("") .unwrap() @@ -946,9 +946,9 @@ mod tests { let mut signed = original.as_http_request(); out_with_session_token_but_excluded .output - .apply_to_request_http1x(&mut signed); + .apply_to_request_http0x(&mut signed); - let expected = http_1x::Request::builder() + let expected = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header( "x-amz-date", @@ -986,7 +986,7 @@ mod tests { } .into(); - let original = http_1x::Request::builder() + let original = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header( "some-header", @@ -1003,9 +1003,9 @@ mod tests { ); let mut signed = original.as_http_request(); - out.output.apply_to_request_http1x(&mut signed); + out.output.apply_to_request_http0x(&mut signed); - let expected = http_1x::Request::builder() + let expected = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .header( "some-header", @@ -1068,12 +1068,12 @@ mod tests { add_header(&mut headers, "some-other-header", "bar", false); let instructions = SigningInstructions::new(headers, vec![]); - let mut request = http_1x::Request::builder() + let mut request = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com") .body("") .unwrap(); - instructions.apply_to_request_http1x(&mut request); + instructions.apply_to_request_http0x(&mut request); let get_header = |n: &str| request.headers().get(n).unwrap().to_str().unwrap(); assert_eq!("foo", get_header("some-header")); @@ -1088,12 +1088,12 @@ mod tests { ]; let instructions = SigningInstructions::new(vec![], params); - let mut request = http_1x::Request::builder() + let mut request = http0::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com/some/path") .body("") .unwrap(); - instructions.apply_to_request_http1x(&mut request); + instructions.apply_to_request_http0x(&mut request); assert_eq!( "/some/path?some-param=f%26o%3Fo&some-other-param%3F=bar", @@ -1109,7 +1109,7 @@ mod tests { ]; let instructions = SigningInstructions::new(vec![], params); - let mut request = http_1x::Request::builder() + let mut request = http::Request::builder() .uri("https://some-endpoint.some-region.amazonaws.com/some/path") .body("") .unwrap(); diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/test.rs b/aws/rust-runtime/aws-sigv4/src/http_request/test.rs index c11cdf8197..be6c496462 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/test.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/test.rs @@ -6,7 +6,7 @@ //! Functions shared between the tests of several modules. use crate::http_request::{SignableBody, SignableRequest}; -use http_1x::{Method, Uri}; +use http0::{Method, Uri}; use std::error::Error as StdError; pub(crate) mod v4 { @@ -258,8 +258,8 @@ impl TestRequest { self.body = TestSignedBody::Signable(body); } - pub(crate) fn as_http_request(&self) -> http_1x::Request<&'static str> { - let mut builder = http_1x::Request::builder() + pub(crate) fn as_http_request(&self) -> http0::Request<&'static str> { + let mut builder = http0::Request::builder() .uri(&self.uri) .method(Method::from_bytes(self.method.as_bytes()).unwrap()); for (k, v) in &self.headers { @@ -269,8 +269,8 @@ impl TestRequest { } } -impl> From> for TestRequest { - fn from(value: http_1x::Request) -> Self { +impl> From> for TestRequest { + fn from(value: http0::Request) -> Self { let invalid = value .headers() .values() diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt index c0f1a0d186..2794fc0295 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt @@ -36,7 +36,7 @@ internal fun RuntimeConfig.awsInlineableHttpRequestChecksum() = CargoDependency.Tracing, AwsCargoDependency.awsRuntime(this).withFeature("http-02x"), CargoDependency.smithyChecksums(this), - CargoDependency.smithyHttp(this).withFeature("compat"), + CargoDependency.smithyHttp(this), CargoDependency.smithyRuntimeApiClient(this), CargoDependency.smithyTypes(this), ), diff --git a/aws/sdk/Cargo.lock b/aws/sdk/Cargo.lock index d067cbbc12..21e6b463d4 100644 --- a/aws/sdk/Cargo.lock +++ b/aws/sdk/Cargo.lock @@ -17,18 +17,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -52,9 +40,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "approx" @@ -67,9 +55,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" [[package]] name = "assert-json-diff" @@ -114,7 +102,7 @@ dependencies = [ "async-task", "concurrent-queue", "fastrand 2.0.2", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "slab", ] @@ -141,7 +129,7 @@ dependencies = [ "async-io 2.3.4", "async-lock 3.4.0", "blocking", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "once_cell", ] @@ -175,10 +163,10 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "parking", - "polling 3.7.3", - "rustix 0.38.37", + "polling 3.7.4", + "rustix 0.38.39", "slab", "tracing", "windows-sys 0.59.0", @@ -228,7 +216,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.37", + "rustix 0.38.39", "windows-sys 0.48.0", ] @@ -244,7 +232,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.37", + "rustix 0.38.39", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -264,7 +252,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "gloo-timers", "kv-log-macro", "log", @@ -295,7 +283,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -312,7 +300,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -329,25 +317,26 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.8" +version = "1.6.0" dependencies = [ "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-sdk-sso", "aws-sdk-ssooidc", "aws-sdk-sts", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "fastrand 2.0.2", "futures-util", "hex", - "http 0.2.12", + "http 1.1.0", "hyper-rustls 0.24.2", "ring", "serde", @@ -367,8 +356,8 @@ version = "1.2.1" dependencies = [ "async-trait", "aws-smithy-async 1.2.1", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "tokio", "zeroize", ] @@ -380,8 +369,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "zeroize", ] @@ -393,7 +382,7 @@ version = "0.60.3" name = "aws-http" version = "0.60.6" dependencies = [ - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", ] [[package]] @@ -446,17 +435,43 @@ dependencies = [ [[package]] name = "aws-runtime" version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a10d5c055aa540164d9561a0e2e74ad30f0dcf7393c3a92f6733ddf9c5762468" +dependencies = [ + "aws-credential-types 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-sigv4 1.2.5", + "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-http 0.60.11", + "aws-smithy-runtime 1.7.3", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", + "aws-types 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "fastrand 2.0.2", + "http 0.2.12", + "http-body 0.4.6", + "once_cell", + "percent-encoding", + "pin-project-lite", + "tracing", + "uuid", +] + +[[package]] +name = "aws-runtime" +version = "1.5.0" dependencies = [ "arbitrary", "aws-credential-types 1.2.1", - "aws-sigv4 1.2.4", + "aws-sigv4 1.3.0", "aws-smithy-async 1.2.1", "aws-smithy-eventstream 0.60.5", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "bytes-utils", @@ -481,32 +496,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "aws-runtime" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a10d5c055aa540164d9561a0e2e74ad30f0dcf7393c3a92f6733ddf9c5762468" -dependencies = [ - "aws-credential-types 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-sigv4 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime 1.7.2", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-types 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes", - "fastrand 2.0.2", - "http 0.2.12", - "http-body 0.4.6", - "once_cell", - "percent-encoding", - "pin-project-lite", - "tracing", - "uuid", -] - [[package]] name = "aws-runtime-api" version = "1.1.8" @@ -517,14 +506,14 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", "aws-smithy-eventstream 0.60.5", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "http 0.2.12", @@ -540,19 +529,21 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "fastrand 2.0.2", "futures-util", "http 0.2.12", + "http 1.1.0", "once_cell", "regex-lite", "serde_json", @@ -567,13 +558,13 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "http 0.2.12", @@ -590,20 +581,22 @@ dependencies = [ "approx", "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "criterion", "fastrand 2.0.2", "futures-util", "http 0.2.12", + "http 1.1.0", "once_cell", "regex-lite", "serde_json", @@ -618,20 +611,22 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-query", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-smithy-xml 0.60.9", "aws-types 1.3.3", "fastrand 2.0.2", "futures-util", "http 0.2.12", + "http 1.1.0", "once_cell", "regex-lite", "serde_json", @@ -646,13 +641,13 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "fastrand 2.0.2", @@ -669,20 +664,22 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", - "aws-sigv4 1.2.4", + "aws-runtime 1.5.0", + "aws-sigv4 1.3.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "futures-util", "hex", "http 0.2.12", + "http 1.1.0", "once_cell", "pretty_assertions", "regex-lite", @@ -700,19 +697,21 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-query", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-smithy-xml 0.60.9", "aws-types 1.3.3", "futures-util", "http 0.2.12", + "http 1.1.0", "once_cell", "regex-lite", "serde_json", @@ -727,18 +726,20 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "futures-util", "http 0.2.12", + "http 1.1.0", "once_cell", "regex-lite", "serde_json", @@ -753,19 +754,21 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", "aws-smithy-eventstream 0.60.5", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "futures-util", "http 0.2.12", + "http 1.1.0", "once_cell", "regex-lite", "serde_json", @@ -780,15 +783,16 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", - "aws-sigv4 1.2.4", + "aws-runtime 1.5.0", + "aws-sigv4 1.3.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "futures-util", @@ -809,18 +813,20 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "futures-util", "http 0.2.12", + "http 1.1.0", "once_cell", "regex-lite", "serde_json", @@ -835,13 +841,13 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-smithy-xml 0.60.9", "aws-types 1.3.3", "http 0.2.12", @@ -860,18 +866,18 @@ dependencies = [ "async-std", "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", - "aws-sigv4 1.2.4", + "aws-runtime 1.5.0", + "aws-sigv4 1.3.0", "aws-smithy-async 1.2.1", - "aws-smithy-checksums 0.60.12", + "aws-smithy-checksums 0.60.13", "aws-smithy-eventstream 0.60.5", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-smithy-xml 0.60.9", "aws-types 1.3.3", "bytes", @@ -904,22 +910,21 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.57.0" +version = "1.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8888c238bf93c77c5df8274b3999fd7fc1bb3fb658616f40dfde9e4fcd9efd94" +checksum = "0506cc60e392e33712d47717d5ae5760a3b134bf8ee7aea7e43df3d7e2669ae0" dependencies = [ - "ahash", "aws-credential-types 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-runtime 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-sigv4 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-runtime 1.4.3", + "aws-sigv4 1.2.5", "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-checksums 0.60.12 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-checksums 0.60.13 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-http 0.60.11", "aws-smithy-json 0.60.7 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime 1.7.2", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-runtime 1.7.3", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "aws-smithy-xml 0.60.9 (registry+https://github.com/rust-lang/crates.io-index)", "aws-types 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bytes", @@ -943,19 +948,21 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-smithy-xml 0.60.9", "aws-types 1.3.3", "fastrand 2.0.2", "futures-util", "http 0.2.12", + "http 1.1.0", "md-5", "once_cell", "regex-lite", @@ -971,13 +978,13 @@ name = "aws-sdk-sso" version = "0.0.0-local" dependencies = [ "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "http 0.2.12", @@ -992,13 +999,13 @@ name = "aws-sdk-ssooidc" version = "0.0.0-local" dependencies = [ "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "http 0.2.12", @@ -1013,19 +1020,21 @@ name = "aws-sdk-sts" version = "0.0.0-local" dependencies = [ "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-query", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-smithy-xml 0.60.9", "aws-types 1.3.3", "futures-util", "http 0.2.12", + "http 1.1.0", "once_cell", "regex-lite", "serde_json", @@ -1040,19 +1049,21 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "fastrand 2.0.2", "futures-util", "http 0.2.12", + "http 1.1.0", "once_cell", "regex-lite", "serde_json", @@ -1067,13 +1078,13 @@ version = "0.0.0-local" dependencies = [ "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", + "aws-runtime 1.5.0", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "fastrand 2.0.2", @@ -1091,22 +1102,24 @@ dependencies = [ "async-stream", "aws-config", "aws-credential-types 1.2.1", - "aws-runtime 1.4.3", - "aws-sigv4 1.2.4", + "aws-runtime 1.5.0", + "aws-sigv4 1.3.0", "aws-smithy-async 1.2.1", "aws-smithy-eventstream 0.60.5", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", + "aws-smithy-http-client", "aws-smithy-json 0.60.7", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "aws-types 1.3.3", "bytes", "futures-core", "futures-util", "hound", "http 0.2.12", + "http 1.1.0", "hyper 0.14.31", "once_cell", "regex-lite", @@ -1122,33 +1135,26 @@ version = "0.60.3" [[package]] name = "aws-sigv4" -version = "1.2.4" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5619742a0d8f253be760bfbb8e8e8368c69e3587e4637af5754e488a611499b1" dependencies = [ - "aws-credential-types 1.2.1", - "aws-smithy-eventstream 0.60.5", + "aws-credential-types 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-http 0.60.11", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.2.9", "bytes", - "criterion", "crypto-bigint 0.5.5", "form_urlencoded", "hex", - "hex-literal", "hmac", "http 0.2.12", "http 1.1.0", - "httparse", - "libfuzzer-sys", "once_cell", "p256", "percent-encoding", - "pretty_assertions", - "proptest", "ring", - "serde", - "serde_derive", - "serde_json", "sha2", "subtle", "time", @@ -1158,26 +1164,33 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8db6904450bafe7473c6ca9123f88cc11089e41a025408f992db4e22d3be68" +version = "1.3.0" dependencies = [ - "aws-credential-types 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-credential-types 1.2.1", + "aws-smithy-eventstream 0.60.5", + "aws-smithy-http 0.62.0", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", + "criterion", "crypto-bigint 0.5.5", "form_urlencoded", "hex", + "hex-literal", "hmac", "http 0.2.12", "http 1.1.0", + "httparse", + "libfuzzer-sys", "once_cell", "p256", "percent-encoding", + "pretty_assertions", + "proptest", "ring", + "serde", + "serde_derive", + "serde_json", "sha2", "subtle", "time", @@ -1211,17 +1224,17 @@ dependencies = [ name = "aws-smithy-cbor" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.3.0", "criterion", "minicbor", ] [[package]] name = "aws-smithy-checksums" -version = "0.60.12" +version = "0.60.13" dependencies = [ - "aws-smithy-http 0.60.11", - "aws-smithy-types 1.2.7", + "aws-smithy-http 0.62.0", + "aws-smithy-types 1.3.0", "bytes", "bytes-utils", "crc32c", @@ -1241,12 +1254,12 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.60.12" +version = "0.60.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598b1689d001c4d4dc3cb386adb07d37786783aee3ac4b324bcadac116bf3d23" +checksum = "ba1a71073fca26775c8b5189175ea8863afb1c9ea2cceb02a5de5ad9dfbaa795" dependencies = [ - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-http 0.60.11", + "aws-smithy-types 1.2.9", "bytes", "crc32c", "crc32fast", @@ -1268,8 +1281,8 @@ version = "0.60.3" name = "aws-smithy-compression" version = "0.0.2" dependencies = [ - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "bytes-utils", "flate2", @@ -1290,7 +1303,7 @@ name = "aws-smithy-eventstream" version = "0.60.5" dependencies = [ "arbitrary", - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.3.0", "bytes", "bytes-utils", "crc32fast", @@ -1303,7 +1316,7 @@ version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cef7d0a272725f87e51ba2bf89f8c21e4df61b9e49ae1ac367a6d69916ef7c90" dependencies = [ - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "bytes", "crc32fast", ] @@ -1315,45 +1328,46 @@ version = "0.2.0" [[package]] name = "aws-smithy-http" version = "0.60.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" dependencies = [ - "async-stream", - "aws-smithy-eventstream 0.60.5", + "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.2.9", "bytes", "bytes-utils", "futures-core", - "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.31", "once_cell", "percent-encoding", "pin-project-lite", "pin-utils", - "proptest", - "tokio", "tracing", ] [[package]] name = "aws-smithy-http" -version = "0.60.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" +version = "0.62.0" dependencies = [ - "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "async-stream", + "aws-smithy-eventstream 0.60.5", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "bytes-utils", "futures-core", + "futures-util", "http 0.2.12", + "http 1.1.0", "http-body 0.4.6", + "hyper 0.14.31", "once_cell", "percent-encoding", "pin-project-lite", "pin-utils", + "proptest", + "tokio", "tracing", ] @@ -1367,8 +1381,8 @@ version = "1.0.0" dependencies = [ "aws-smithy-async 1.2.1", "aws-smithy-protocol-test 0.63.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "h2 0.4.6", "http 0.2.12", @@ -1385,7 +1399,7 @@ dependencies = [ "once_cell", "pin-project-lite", "rustls 0.21.12", - "rustls 0.23.15", + "rustls 0.23.16", "serde", "serde_json", "tokio", @@ -1401,7 +1415,7 @@ version = "0.60.3" name = "aws-smithy-json" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.3.0", "proptest", "serde_json", ] @@ -1412,16 +1426,16 @@ version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" dependencies = [ - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", ] [[package]] name = "aws-smithy-mocks-experimental" version = "0.2.1" dependencies = [ - "aws-sdk-s3 1.57.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-sdk-s3 1.60.0", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "tokio", ] @@ -1430,7 +1444,7 @@ name = "aws-smithy-protocol-test" version = "0.63.0" dependencies = [ "assert-json-diff", - "aws-smithy-runtime-api 1.7.3", + "aws-smithy-runtime-api 1.7.4", "base64-simd", "cbor-diag", "ciborium", @@ -1449,7 +1463,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b92b62199921f10685c6b588fdbeb81168ae4e7950ae3e5f50145a01bb5f1ad" dependencies = [ "assert-json-diff", - "aws-smithy-runtime-api 1.7.2", + "aws-smithy-runtime-api 1.7.3", "base64-simd", "cbor-diag", "ciborium", @@ -1465,21 +1479,21 @@ dependencies = [ name = "aws-smithy-query" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.3.0", "urlencoding", ] [[package]] name = "aws-smithy-runtime" -version = "1.7.2" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a065c0fe6fdbdf9f11817eb68582b2ab4aff9e9c39e986ae48f7ec576c6322db" +checksum = "be28bd063fa91fd871d131fc8b68d7cd4c5fa0869bea68daca50dcb1cbd76be2" dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-http 0.60.11", "aws-smithy-protocol-test 0.63.0 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "bytes", "fastrand 2.0.2", "h2 0.3.26", @@ -1507,10 +1521,10 @@ version = "1.8.0" dependencies = [ "approx", "aws-smithy-async 1.2.1", - "aws-smithy-http 0.60.11", + "aws-smithy-http 0.62.0", "aws-smithy-http-client", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "fastrand 2.0.2", "futures-util", @@ -1532,12 +1546,12 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.7.2" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e086682a53d3aa241192aa110fa8dfce98f2f5ac2ead0de84d41582c7e8fdb96" +checksum = "92165296a47a812b267b4f41032ff8069ab7ff783696d217f0994a0d7ab585cd" dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "bytes", "http 0.2.12", "http 1.1.0", @@ -1549,10 +1563,10 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.7.3" +version = "1.7.4" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.3.0", "bytes", "http 0.2.12", "http 1.1.0", @@ -1565,61 +1579,61 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.7" +version = "1.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fbd94a32b3a7d55d3806fe27d98d3ad393050439dd05eb53ece36ec5e3d3510" dependencies = [ - "base64 0.13.1", "base64-simd", "bytes", "bytes-utils", - "ciborium", - "criterion", "futures-core", "http 0.2.12", "http 1.1.0", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", - "hyper 0.14.31", "itoa", - "lazy_static", "num-integer", "pin-project-lite", "pin-utils", - "proptest", - "rand", "ryu", "serde", - "serde_json", - "tempfile", "time", "tokio", - "tokio-stream", "tokio-util", ] [[package]] name = "aws-smithy-types" -version = "1.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147100a7bea70fa20ef224a6bad700358305f5dc0f84649c53769761395b355b" +version = "1.3.0" dependencies = [ + "base64 0.13.1", "base64-simd", "bytes", "bytes-utils", + "ciborium", + "criterion", "futures-core", "http 0.2.12", "http 1.1.0", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", + "hyper 0.14.31", "itoa", + "lazy_static", "num-integer", "pin-project-lite", "pin-utils", + "proptest", + "rand", "ryu", "serde", + "serde_json", + "tempfile", "time", "tokio", + "tokio-stream", "tokio-util", ] @@ -1628,7 +1642,7 @@ name = "aws-smithy-types-convert" version = "0.60.8" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.3.0", "chrono", "futures-core", "time", @@ -1638,9 +1652,9 @@ dependencies = [ name = "aws-smithy-wasm" version = "0.1.3" dependencies = [ - "aws-smithy-http 0.60.11", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-http 0.62.0", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "bytes", "http 1.1.0", "tracing", @@ -1673,8 +1687,8 @@ dependencies = [ "aws-credential-types 1.2.1", "aws-smithy-async 1.2.1", "aws-smithy-runtime 1.8.0", - "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.4", + "aws-smithy-types 1.3.0", "http 0.2.12", "hyper-rustls 0.24.2", "rustc_version", @@ -1692,8 +1706,8 @@ checksum = "5221b91b3e441e6675310829fd8984801b772cb1546ef6c0e54dec9f1ac13fef" dependencies = [ "aws-credential-types 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "rustc_version", "tracing", ] @@ -1766,7 +1780,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.82", + "syn 2.0.87", "which", ] @@ -1815,7 +1829,7 @@ dependencies = [ "async-channel 2.3.1", "async-task", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "piper", ] @@ -1883,9 +1897,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" dependencies = [ "jobserver", "libc", @@ -2190,13 +2204,13 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2216,6 +2230,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dunce" version = "1.0.5" @@ -2426,9 +2451,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "3f1fa2f9765705486b33fd2acf1577f8ec449c2ba1f318ae5447697b7c08d210" dependencies = [ "fastrand 2.0.2", "futures-core", @@ -2445,7 +2470,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2580,9 +2605,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "allocator-api2", "equivalent", @@ -2791,7 +2816,7 @@ dependencies = [ "http 1.1.0", "hyper 1.5.0", "hyper-util", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", @@ -2801,9 +2826,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2818,14 +2843,143 @@ dependencies = [ "tracing", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -2935,9 +3089,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libfuzzer-sys" @@ -2962,9 +3116,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" @@ -2978,6 +3132,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -3049,7 +3209,7 @@ checksum = "bd2209fff77f705b00c737016a48e73733d7fbccb8b007194db148f03561fb70" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3244,9 +3404,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -3321,15 +3481,15 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.3" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.37", + "rustix 0.38.39", "tracing", "windows-sys 0.59.0", ] @@ -3361,12 +3521,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3395,9 +3555,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -3507,9 +3667,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -3627,9 +3787,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ "bitflags 2.6.0", "errno", @@ -3652,9 +3812,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "aws-lc-rs", "once_cell", @@ -3839,22 +3999,22 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac55e59090389fb9f0dd9e0f3c09615afed1d19094284d0b200441f13550793" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be4f245ce16bc58d57ef2716271d0d4519e0f6defa147f6e081005bcb278ff" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3994,6 +4154,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "subtle" version = "2.6.1" @@ -4013,15 +4179,26 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "tempfile" version = "3.12.0" @@ -4031,28 +4208,28 @@ dependencies = [ "cfg-if", "fastrand 2.0.2", "once_cell", - "rustix 0.38.37", + "rustix 0.38.39", "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -4096,6 +4273,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -4123,9 +4310,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -4147,7 +4334,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -4166,7 +4353,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pki-types", "tokio", ] @@ -4261,7 +4448,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -4334,7 +4521,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -4355,27 +4542,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -4390,9 +4562,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -4405,6 +4577,18 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.11.0" @@ -4419,9 +4603,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" +checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" [[package]] name = "version_check" @@ -4506,7 +4690,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -4540,7 +4724,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4576,7 +4760,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.37", + "rustix 0.38.39", ] [[package]] @@ -4767,6 +4951,18 @@ dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xmlparser" version = "0.13.6" @@ -4779,6 +4975,30 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -4797,7 +5017,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -4805,3 +5046,25 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index 4f75cfac1a..c32b27dad1 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -17,18 +17,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -52,9 +40,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "approx" @@ -67,9 +55,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" [[package]] name = "assert-json-diff" @@ -112,7 +100,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -145,8 +133,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "zeroize", ] @@ -204,9 +192,9 @@ dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-http 0.60.11", - "aws-smithy-runtime 1.7.2", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime 1.7.3", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "aws-types", "bytes", "fastrand", @@ -221,22 +209,21 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.57.0" +version = "1.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8888c238bf93c77c5df8274b3999fd7fc1bb3fb658616f40dfde9e4fcd9efd94" +checksum = "0506cc60e392e33712d47717d5ae5760a3b134bf8ee7aea7e43df3d7e2669ae0" dependencies = [ - "ahash", "aws-credential-types", "aws-runtime", "aws-sigv4", "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-checksums 0.60.12", + "aws-smithy-checksums 0.60.13", "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-http 0.60.11", "aws-smithy-json 0.60.7 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime 1.7.2", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime 1.7.3", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "aws-smithy-xml 0.60.9 (registry+https://github.com/rust-lang/crates.io-index)", "aws-types", "bytes", @@ -256,15 +243,15 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8db6904450bafe7473c6ca9123f88cc11089e41a025408f992db4e22d3be68" +checksum = "5619742a0d8f253be760bfbb8e8e8368c69e3587e4637af5754e488a611499b1" dependencies = [ "aws-credential-types", "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-http 0.60.11", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "bytes", "crypto-bigint 0.5.5", "form_urlencoded", @@ -316,12 +303,12 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.60.12" +version = "0.60.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598b1689d001c4d4dc3cb386adb07d37786783aee3ac4b324bcadac116bf3d23" +checksum = "ba1a71073fca26775c8b5189175ea8863afb1c9ea2cceb02a5de5ad9dfbaa795" dependencies = [ "aws-smithy-http 0.60.11", - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.2.9", "bytes", "crc32c", "crc32fast", @@ -337,7 +324,7 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.70.0" +version = "0.60.14" dependencies = [ "aws-smithy-http 0.62.0", "aws-smithy-types 1.3.0", @@ -346,9 +333,8 @@ dependencies = [ "crc32c", "crc32fast", "hex", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", + "http 0.2.12", + "http-body 0.4.6", "md-5", "pin-project-lite", "pretty_assertions", @@ -402,7 +388,7 @@ version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cef7d0a272725f87e51ba2bf89f8c21e4df61b9e49ae1ac367a6d69916ef7c90" dependencies = [ - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.2.9", "bytes", "crc32fast", ] @@ -418,8 +404,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" dependencies = [ "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "bytes", "bytes-utils", "futures-core", @@ -447,7 +433,6 @@ dependencies = [ "http 0.2.12", "http 1.1.0", "http-body 0.4.6", - "http-body 1.0.1", "hyper 0.14.31", "once_cell", "percent-encoding", @@ -486,7 +471,7 @@ dependencies = [ "once_cell", "pin-project-lite", "rustls 0.21.12", - "rustls 0.23.15", + "rustls 0.23.16", "serde", "serde_json", "tokio", @@ -583,7 +568,7 @@ version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" dependencies = [ - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.2.9", ] [[package]] @@ -620,7 +605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b92b62199921f10685c6b588fdbeb81168ae4e7950ae3e5f50145a01bb5f1ad" dependencies = [ "assert-json-diff", - "aws-smithy-runtime-api 1.7.2", + "aws-smithy-runtime-api 1.7.3", "base64-simd", "cbor-diag", "ciborium", @@ -642,15 +627,15 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.2" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a065c0fe6fdbdf9f11817eb68582b2ab4aff9e9c39e986ae48f7ec576c6322db" +checksum = "be28bd063fa91fd871d131fc8b68d7cd4c5fa0869bea68daca50dcb1cbd76be2" dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-http 0.60.11", "aws-smithy-protocol-test 0.63.0 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "bytes", "fastrand", "h2 0.3.26", @@ -703,12 +688,12 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.7.2" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e086682a53d3aa241192aa110fa8dfce98f2f5ac2ead0de84d41582c7e8fdb96" +checksum = "92165296a47a812b267b4f41032ff8069ab7ff783696d217f0994a0d7ab585cd" dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.7", + "aws-smithy-types 1.2.9", "bytes", "http 0.2.12", "http 1.1.0", @@ -736,9 +721,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.7" +version = "1.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147100a7bea70fa20ef224a6bad700358305f5dc0f84649c53769761395b355b" +checksum = "4fbd94a32b3a7d55d3806fe27d98d3ad393050439dd05eb53ece36ec5e3d3510" dependencies = [ "base64-simd", "bytes", @@ -845,8 +830,8 @@ checksum = "5221b91b3e441e6675310829fd8984801b772cb1546ef6c0e54dec9f1ac13fef" dependencies = [ "aws-credential-types", "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.7", + "aws-smithy-runtime-api 1.7.3", + "aws-smithy-types 1.2.9", "rustc_version", "tracing", ] @@ -941,7 +926,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.82", + "syn 2.0.87", "which", ] @@ -1048,9 +1033,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" dependencies = [ "jobserver", "libc", @@ -1370,13 +1355,13 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -1396,6 +1381,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dunce" version = "1.0.5" @@ -1442,9 +1438,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1592,7 +1588,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -1725,9 +1721,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "allocator-api2", "equivalent", @@ -1934,7 +1930,7 @@ dependencies = [ "http 1.1.0", "hyper 1.5.0", "hyper-util", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", @@ -1944,9 +1940,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1961,14 +1957,143 @@ dependencies = [ "tracing", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1988,7 +2113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -2014,7 +2139,6 @@ dependencies = [ "fastrand", "futures-util", "http 0.2.12", - "http 1.1.0", "http-body 0.4.6", "md-5", "once_cell", @@ -2160,9 +2284,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libloading" @@ -2176,9 +2300,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" @@ -2186,6 +2310,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -2208,7 +2338,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.0", + "hashbrown 0.15.1", ] [[package]] @@ -2269,7 +2399,7 @@ checksum = "bd2209fff77f705b00c737016a48e73733d7fbccb8b007194db148f03561fb70" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2483,29 +2613,29 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2578,12 +2708,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2612,9 +2742,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -2835,9 +2965,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2956,9 +3086,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ "bitflags 2.6.0", "errno", @@ -2981,9 +3111,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "aws-lc-rs", "once_cell", @@ -3168,22 +3298,22 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac55e59090389fb9f0dd9e0f3c09615afed1d19094284d0b200441f13550793" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be4f245ce16bc58d57ef2716271d0d4519e0f6defa147f6e081005bcb278ff" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3335,6 +3465,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.10.0" @@ -3360,15 +3496,26 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "target-lexicon" version = "0.12.16" @@ -3405,22 +3552,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3464,6 +3611,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -3505,9 +3662,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.41.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -3529,7 +3686,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3548,7 +3705,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pki-types", "tokio", ] @@ -3692,7 +3849,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3765,7 +3922,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3786,27 +3943,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unindent" version = "0.1.11" @@ -3827,9 +3969,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -3842,6 +3984,18 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.11.0" @@ -3935,7 +4089,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -3957,7 +4111,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4112,6 +4266,18 @@ dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xmlparser" version = "0.13.6" @@ -4133,6 +4299,30 @@ dependencies = [ "time", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -4151,7 +4341,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -4159,3 +4370,25 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] diff --git a/rust-runtime/aws-smithy-checksums/Cargo.toml b/rust-runtime/aws-smithy-checksums/Cargo.toml index 2f8ebc3d00..63878e8089 100644 --- a/rust-runtime/aws-smithy-checksums/Cargo.toml +++ b/rust-runtime/aws-smithy-checksums/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-checksums" -version = "0.70.0" +version = "0.60.14" authors = [ "AWS Rust SDK Team ", "Zelda Hessler ", @@ -14,13 +14,13 @@ repository = "https://github.com/smithy-lang/smithy-rs" [dependencies] aws-smithy-http = { path = "../aws-smithy-http" } -aws-smithy-types = { path = "../aws-smithy-types", features = ["http-body-1-x"] } +aws-smithy-types = { path = "../aws-smithy-types" } bytes = "1" crc32c = "0.6.8" crc32fast = "1.3" hex = "0.4.3" -http = "1" -http-body = "1" +http = "0.2.8" +http-body = "0.4.4" md-5 = "0.10" pin-project-lite = "0.2.9" sha1 = "0.10" @@ -29,7 +29,6 @@ tracing = "0.1" [dev-dependencies] bytes-utils = "0.1.2" -http-body-util = "0.1.2" pretty_assertions = "1.3" tokio = { version = "1.23.1", features = ["macros", "rt"] } tracing-test = "0.2.1" diff --git a/rust-runtime/aws-smithy-checksums/src/body/calculate.rs b/rust-runtime/aws-smithy-checksums/src/body/calculate.rs index f31fe32c3a..a1f6c25a19 100644 --- a/rust-runtime/aws-smithy-checksums/src/body/calculate.rs +++ b/rust-runtime/aws-smithy-checksums/src/body/calculate.rs @@ -10,7 +10,8 @@ use crate::http::HttpChecksum; use aws_smithy_http::header::append_merge_header_maps; use aws_smithy_types::body::SdkBody; -use http_body::{Frame, SizeHint}; +use http::HeaderMap; +use http_body::SizeHint; use pin_project_lite::pin_project; use std::pin::Pin; @@ -39,44 +40,48 @@ impl http_body::Body for ChecksumBody { type Data = bytes::Bytes; type Error = aws_smithy_types::body::Error; - fn poll_frame( + fn poll_data( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll, Self::Error>>> { + ) -> Poll>> { let this = self.project(); - - match this.body.poll_frame(cx) { - Poll::Ready(Some(Ok(frame))) if frame.is_data() => { - let data = frame.into_data().expect("unreachable"); - match this.checksum { - Some(checksum) => { - checksum.update(&data); - Poll::Ready(Some(Ok(Frame::data(data)))) - } - None => unreachable!("This can only fail if poll_data is called again after poll_trailers, which is invalid"), - } - } - Poll::Ready(Some(Ok(non_data_frame))) => match non_data_frame.into_trailers() { - Ok(inner_trailers) => { - if let Some(checksum) = this.checksum.take() { - let merged = append_merge_header_maps(inner_trailers, checksum.headers()); - Poll::Ready(Some(Ok(Frame::trailers(merged)))) - } else { - Poll::Ready(Some(Ok(Frame::trailers(inner_trailers)))) - } - } - Err(non_trailer_frame) => Poll::Ready(Some(Ok(non_trailer_frame))), - }, - Poll::Ready(None) => { - if let Some(checksum) = this.checksum.take() { - Poll::Ready(Some(Ok(Frame::trailers(checksum.headers())))) - } else { - Poll::Ready(None) + match this.checksum { + Some(checksum) => { + let poll_res = this.body.poll_data(cx); + if let Poll::Ready(Some(Ok(data))) = &poll_res { + checksum.update(data); } + + poll_res } - Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))), - Poll::Pending => Poll::Pending, + None => unreachable!("This can only fail if poll_data is called again after poll_trailers, which is invalid"), + } + } + + fn poll_trailers( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll, Self::Error>> { + let this = self.project(); + let poll_res = this.body.poll_trailers(cx); + + if let Poll::Ready(Ok(maybe_inner_trailers)) = poll_res { + let checksum_headers = if let Some(checksum) = this.checksum.take() { + checksum.headers() + } else { + return Poll::Ready(Ok(None)); + }; + + return match maybe_inner_trailers { + Some(inner_trailers) => Poll::Ready(Ok(Some(append_merge_header_maps( + inner_trailers, + checksum_headers, + )))), + None => Poll::Ready(Ok(Some(checksum_headers))), + }; } + + poll_res } fn is_end_stream(&self) -> bool { @@ -97,6 +102,8 @@ mod tests { use aws_smithy_types::base64; use aws_smithy_types::body::SdkBody; use bytes::Buf; + use bytes_utils::SegmentedBuf; + use http_body::Body; use std::fmt::Write; use std::io::Read; @@ -114,18 +121,32 @@ mod tests { #[tokio::test] async fn test_checksum_body() { - use http_body_util::BodyExt; let input_text = "This is some test text for an SdkBody"; let body = SdkBody::from(input_text); let checksum = CRC_32_NAME .parse::() .unwrap() .into_impl(); - let body = ChecksumBody::new(body, checksum); + let mut body = ChecksumBody::new(body, checksum); - let collected = body.collect().await.expect("body and trailers valid"); + let mut output = SegmentedBuf::new(); + while let Some(buf) = body.data().await { + output.push(buf.unwrap()); + } - let trailers = collected.trailers().expect("trailers were set").to_owned(); + let mut output_text = String::new(); + output + .reader() + .read_to_string(&mut output_text) + .expect("Doesn't cause IO errors"); + // Verify data is complete and unaltered + assert_eq!(input_text, output_text); + + let trailers = body + .trailers() + .await + .expect("checksum generation was without error") + .expect("trailers were set"); let checksum_trailer = trailers .get(CRC_32_HEADER_NAME) .expect("trailers contain crc32 checksum"); @@ -133,14 +154,5 @@ mod tests { // Known correct checksum for the input "This is some test text for an SdkBody" assert_eq!("0x99B01F72", checksum_trailer); - - let mut output_text = String::new(); - collected - .to_bytes() - .reader() - .read_to_string(&mut output_text) - .expect("Doesn't cause IO errors"); - // Verify data is complete and unaltered - assert_eq!(input_text, output_text); } } diff --git a/rust-runtime/aws-smithy-checksums/src/body/validate.rs b/rust-runtime/aws-smithy-checksums/src/body/validate.rs index c76ddab5b2..cf15815772 100644 --- a/rust-runtime/aws-smithy-checksums/src/body/validate.rs +++ b/rust-runtime/aws-smithy-checksums/src/body/validate.rs @@ -11,7 +11,8 @@ use crate::http::HttpChecksum; use aws_smithy_types::body::SdkBody; use bytes::Bytes; -use http_body::{Body, Frame, SizeHint}; +use http::{HeaderMap, HeaderValue}; +use http_body::SizeHint; use pin_project_lite::pin_project; use std::fmt::Display; @@ -47,13 +48,14 @@ impl ChecksumBody { fn poll_inner( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll, aws_smithy_types::body::Error>>> { + ) -> Poll>> { + use http_body::Body; + let this = self.project(); let checksum = this.checksum; - match this.inner.poll_frame(cx) { - Poll::Ready(Some(Ok(frame))) if frame.is_data() => { - let data = frame.into_data().expect("unreachable"); + match this.inner.poll_data(cx) { + Poll::Ready(Some(Ok(data))) => { tracing::trace!( "reading {} bytes from the body and updating the checksum calculation", data.len() @@ -66,9 +68,8 @@ impl ChecksumBody { }; checksum.update(&data); - Poll::Ready(Some(Ok(Frame::data(data)))) + Poll::Ready(Some(Ok(data))) } - Poll::Ready(Some(Ok(non_data_frame))) => Poll::Ready(Some(Ok(non_data_frame))), // Once the inner body has stopped returning data, check the checksum // and return an error if it doesn't match. Poll::Ready(None) => { @@ -127,13 +128,20 @@ impl http_body::Body for ChecksumBody { type Data = Bytes; type Error = aws_smithy_types::body::Error; - fn poll_frame( + fn poll_data( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll, Self::Error>>> { + ) -> Poll>> { self.poll_inner(cx) } + fn poll_trailers( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>, Self::Error>> { + self.project().inner.poll_trailers(cx) + } + fn is_end_stream(&self) -> bool { self.checksum.is_none() } @@ -150,7 +158,7 @@ mod tests { use aws_smithy_types::body::SdkBody; use bytes::{Buf, Bytes}; use bytes_utils::SegmentedBuf; - use http_body_util::BodyExt; + use http_body::Body; use std::io::Read; fn calculate_crc32_checksum(input: &str) -> Bytes { @@ -170,8 +178,8 @@ mod tests { non_matching_checksum.clone(), ); - while let Some(frame) = body.frame().await { - match frame { + while let Some(data) = body.data().await { + match data { Ok(_) => { /* Do nothing */ } Err(e) => { match e.downcast_ref::().unwrap() { @@ -198,12 +206,8 @@ mod tests { let mut body = ChecksumBody::new(body, http_checksum, actual_checksum); let mut output = SegmentedBuf::new(); - while let Some(frame) = body.frame().await { - let data = frame - .expect("frame expected") - .into_data() - .expect("only data frames"); - output.push(data); + while let Some(buf) = body.data().await { + output.push(buf.unwrap()); } let mut output_text = String::new(); diff --git a/rust-runtime/aws-smithy-http/Cargo.toml b/rust-runtime/aws-smithy-http/Cargo.toml index 4c6b7f95f6..f017945b73 100644 --- a/rust-runtime/aws-smithy-http/Cargo.toml +++ b/rust-runtime/aws-smithy-http/Cargo.toml @@ -13,20 +13,17 @@ repository = "https://github.com/smithy-lang/smithy-rs" [features] event-stream = ["aws-smithy-eventstream"] rt-tokio = ["aws-smithy-types/rt-tokio"] -compat = ["dep:http-02x"] [dependencies] aws-smithy-eventstream = { path = "../aws-smithy-eventstream", optional = true } -# FIXME(hyper1) - _somewhere_ in codegen relies on http-02x feature enabled via this crate, find and fix -aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["client", "http-1x", "http-02x"] } +aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["client", "http-02x"] } aws-smithy-types = { path = "../aws-smithy-types", features = ["byte-stream-poll-next", "http-body-0-4-x"] } bytes = "1" bytes-utils = "0.1" +# TODO(hyper1) - Complete the breaking changes by updating to http 1.x ecosystem fully in this crate. Also remove hyper 0.14 from dev +http-02x = { package = "http", version = "0.2.3" } http-1x = { package = "http", version = "1" } -http-02x = { package = "http", version = "0.2.9", optional = true } -# TODO(hyper1) - remove in favor of http-body-1x with breaking 0.62 change http-body-04x = { package = "http-body", version = "0.4.4" } -http-body-1x = { package = "http-body", version = "1" } once_cell = "1.10" percent-encoding = "2.1.0" pin-project-lite = "0.2.9" diff --git a/rust-runtime/aws-smithy-http/src/compat.rs b/rust-runtime/aws-smithy-http/src/compat.rs deleted file mode 100644 index 8b098fd794..0000000000 --- a/rust-runtime/aws-smithy-http/src/compat.rs +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -use core::task::ready; -use pin_project_lite::pin_project; -use std::pin::Pin; -use std::task::Context; -use std::task::Poll; - -pin_project! { - /// http-0.4.x to http-1.x body conversion util. This is meant for internal use only and may be - /// removed in the future. - pub struct Http04toHttp1x { - #[pin] - inner: B, - state: State, - } -} - -enum State { - PollData, - PollTrailers, - Done, -} - -impl Http04toHttp1x { - /// Create a new shim to convert http-0.4.x body to an http-1.x body. - pub fn new(inner: B) -> Self { - Self { - inner, - state: State::PollData, - } - } -} - -impl http_body_1x::Body for Http04toHttp1x -where - B: http_body_04x::Body, -{ - type Data = B::Data; - type Error = B::Error; - - fn poll_frame( - self: std::pin::Pin<&mut Self>, - cx: &mut std::task::Context<'_>, - ) -> std::task::Poll, Self::Error>>> { - let mut this = self.project(); - - loop { - match this.state { - State::PollData => match ready!(this.inner.as_mut().poll_data(cx)) { - Some(data) => return Poll::Ready(Some(data.map(http_body_1x::Frame::data))), - None => *this.state = State::PollTrailers, - }, - State::PollTrailers => { - let result = match ready!(this.inner.as_mut().poll_trailers(cx)) { - Ok(trailers) => Poll::Ready( - trailers - .map(convert_headers_0x_1x) - .map(http_body_1x::Frame::::trailers) - .map(Result::Ok), - ), - Err(err) => Poll::Ready(Some(Err(err))), - }; - - *this.state = State::Done; - return result; - } - State::Done => return Poll::Ready(None), - } - } - } - - fn is_end_stream(&self) -> bool { - self.inner.is_end_stream() - } - - fn size_hint(&self) -> http_body_1x::SizeHint { - let mut size_hint = http_body_1x::SizeHint::new(); - let inner_hint = self.inner.size_hint(); - if let Some(exact) = inner_hint.exact() { - size_hint.set_exact(exact) - } else { - size_hint.set_lower(inner_hint.lower()); - if let Some(upper) = inner_hint.upper() { - size_hint.set_upper(upper); - } - } - size_hint - } -} - -pub fn convert_headers_0x_1x(input: http_02x::HeaderMap) -> http_1x::HeaderMap { - let mut map = http_1x::HeaderMap::with_capacity(input.capacity()); - let mut mem: Option = None; - for (k, v) in input.into_iter() { - let name = k.or_else(|| mem.clone()).unwrap(); - map.append( - http_1x::HeaderName::from_bytes(name.as_str().as_bytes()).expect("already validated"), - http_1x::HeaderValue::from_bytes(v.as_bytes()).expect("already validated"), - ); - mem = Some(name); - } - map -} - -pin_project! { - /// http-1.x to http-0.4.x body conversion util. This is meant for internal use only and may be - /// removed in the future. - pub struct Http1toHttp04 { - #[pin] - inner: B, - trailers: Option, - } -} - -impl Http1toHttp04 { - /// Create a new shim to convert http-1.x body to an http-0.4.x body. - pub fn new(inner: B) -> Self { - Self { - inner, - trailers: None, - } - } -} - -impl http_body_04x::Body for Http1toHttp04 -where - B: http_body_1x::Body, -{ - type Data = B::Data; - type Error = B::Error; - - fn poll_data( - mut self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll>> { - loop { - let this = self.as_mut().project(); - match ready!(this.inner.poll_frame(cx)) { - Some(Ok(frame)) => { - let frame = match frame.into_data() { - Ok(data) => return Poll::Ready(Some(Ok(data))), - Err(frame) => frame, - }; - // when we get a trailers frame, store the trailers for the next poll - if let Ok(trailers) = frame.into_trailers() { - this.trailers.replace(trailers); - return Poll::Ready(None); - }; - // if the frame type was unknown, discard it. the next one might be something - // useful - } - Some(Err(e)) => return Poll::Ready(Some(Err(e))), - None => return Poll::Ready(None), - } - } - } - - fn poll_trailers( - self: Pin<&mut Self>, - _cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - // all of the polling happens in poll_data, once we get to the trailers we've actually - // already read everything - let this = self.project(); - match this.trailers.take() { - Some(headers) => Poll::Ready(Ok(Some(convert_headers_1x_0x(headers)))), - None => Poll::Ready(Ok(None)), - } - } - - fn is_end_stream(&self) -> bool { - self.inner.is_end_stream() - } - - fn size_hint(&self) -> http_body_04x::SizeHint { - let mut size_hint = http_body_04x::SizeHint::new(); - let inner_hint = self.inner.size_hint(); - if let Some(exact) = inner_hint.exact() { - size_hint.set_exact(exact); - } else { - size_hint.set_lower(inner_hint.lower()); - if let Some(upper) = inner_hint.upper() { - size_hint.set_upper(upper); - } - } - size_hint - } -} - -pub fn convert_headers_1x_0x(input: http_1x::HeaderMap) -> http_02x::HeaderMap { - let mut map = http_02x::HeaderMap::with_capacity(input.capacity()); - let mut mem: Option = None; - for (k, v) in input.into_iter() { - let name = k.or_else(|| mem.clone()).unwrap(); - map.append( - http_02x::HeaderName::from_bytes(name.as_str().as_bytes()).expect("already validated"), - http_02x::HeaderValue::from_bytes(v.as_bytes()).expect("already validated"), - ); - mem = Some(name); - } - map -} diff --git a/rust-runtime/aws-smithy-http/src/header.rs b/rust-runtime/aws-smithy-http/src/header.rs index bcc62788e6..4519bf490f 100644 --- a/rust-runtime/aws-smithy-http/src/header.rs +++ b/rust-runtime/aws-smithy-http/src/header.rs @@ -8,7 +8,7 @@ use aws_smithy_types::date_time::Format; use aws_smithy_types::primitive::Parse; use aws_smithy_types::DateTime; -use http_1x::header::{HeaderMap, HeaderName, HeaderValue}; +use http_02x::header::{HeaderMap, HeaderName, HeaderValue}; use std::borrow::Cow; use std::error::Error; use std::fmt; @@ -151,13 +151,13 @@ where /// Given an HTTP request, set a request header if that header was not already set. pub fn set_request_header_if_absent( - request: http_1x::request::Builder, + request: http_02x::request::Builder, key: HeaderName, value: V, -) -> http_1x::request::Builder +) -> http_02x::request::Builder where HeaderValue: TryFrom, - >::Error: Into, + >::Error: Into, { if !request .headers_ref() @@ -172,13 +172,13 @@ where /// Given an HTTP response, set a response header if that header was not already set. pub fn set_response_header_if_absent( - response: http_1x::response::Builder, + response: http_02x::response::Builder, key: HeaderName, value: V, -) -> http_1x::response::Builder +) -> http_02x::response::Builder where HeaderValue: TryFrom, - >::Error: Into, + >::Error: Into, { if !response .headers_ref() @@ -340,12 +340,12 @@ mod test { use aws_smithy_runtime_api::http::Request; use aws_smithy_types::error::display::DisplayErrorContext; use aws_smithy_types::{date_time::Format, DateTime}; - use http_1x::header::{HeaderMap, HeaderName, HeaderValue}; + use http_02x::header::{HeaderMap, HeaderName, HeaderValue}; use std::collections::HashMap; #[test] fn put_on_request_if_absent() { - let builder = http_1x::Request::builder().header("foo", "bar"); + let builder = http_02x::Request::builder().header("foo", "bar"); let builder = set_request_header_if_absent(builder, HeaderName::from_static("foo"), "baz"); let builder = set_request_header_if_absent(builder, HeaderName::from_static("other"), "value"); @@ -362,7 +362,7 @@ mod test { #[test] fn put_on_response_if_absent() { - let builder = http_1x::Response::builder().header("foo", "bar"); + let builder = http_02x::Response::builder().header("foo", "bar"); let builder = set_response_header_if_absent(builder, HeaderName::from_static("foo"), "baz"); let builder = set_response_header_if_absent(builder, HeaderName::from_static("other"), "value"); @@ -383,7 +383,7 @@ mod test { #[test] fn parse_floats() { - let test_request = http_1x::Request::builder() + let test_request = http_02x::Request::builder() .header("X-Float-Multi", "0.0,Infinity,-Infinity,5555.5") .header("X-Float-Error", "notafloat") .body(()) @@ -421,7 +421,7 @@ mod test { #[test] fn test_many_dates() { - let test_request = http_1x::Request::builder() + let test_request = http_02x::Request::builder() .header("Empty", "") .header("SingleHttpDate", "Wed, 21 Oct 2015 07:28:00 GMT") .header( @@ -473,7 +473,7 @@ mod test { #[test] fn read_many_strings() { - let test_request = http_1x::Request::builder() + let test_request = http_02x::Request::builder() .header("Empty", "") .header("Foo", " foo") .header("FooTrailing", "foo ") @@ -524,7 +524,7 @@ mod test { #[test] fn read_many_bools() { - let test_request = http_1x::Request::builder() + let test_request = http_02x::Request::builder() .header("X-Bool-Multi", "true,false") .header("X-Bool-Multi", "true") .header("X-Bool", "true") @@ -590,7 +590,7 @@ mod test { #[test] fn check_read_many_i16() { - let test_request = http_1x::Request::builder() + let test_request = http_02x::Request::builder() .header("X-Multi", "123,456") .header("X-Multi", "789") .header("X-Num", "777") @@ -657,7 +657,7 @@ mod test { #[test] fn test_prefix_headers() { let test_request = Request::try_from( - http_1x::Request::builder() + http_02x::Request::builder() .header("X-Prefix-A", "123,456") .header("X-Prefix-B", "789") .header("X-Prefix-C", "777") diff --git a/rust-runtime/aws-smithy-http/src/label.rs b/rust-runtime/aws-smithy-http/src/label.rs index 720b812c5c..5d24fca442 100644 --- a/rust-runtime/aws-smithy-http/src/label.rs +++ b/rust-runtime/aws-smithy-http/src/label.rs @@ -41,7 +41,7 @@ pub fn fmt_timestamp(t: &DateTime, format: Format) -> Result Writer<'a> { #[cfg(test)] mod test { use crate::query::{fmt_string, Writer}; - use http_1x::Uri; + use http_02x::Uri; use proptest::proptest; #[test] diff --git a/rust-runtime/aws-smithy-http/src/query_writer.rs b/rust-runtime/aws-smithy-http/src/query_writer.rs index d04decb72b..fef41d0830 100644 --- a/rust-runtime/aws-smithy-http/src/query_writer.rs +++ b/rust-runtime/aws-smithy-http/src/query_writer.rs @@ -4,8 +4,8 @@ */ use crate::query::fmt_string as percent_encode_query; -use http_1x::uri::InvalidUri; -use http_1x::Uri; +use http_02x::uri::InvalidUri; +use http_02x::Uri; /// Utility for updating the query string in a [`Uri`]. #[allow(missing_debug_implementations)] @@ -82,7 +82,7 @@ impl QueryWriter { #[cfg(test)] mod test { use super::QueryWriter; - use http_1x::Uri; + use http_02x::Uri; #[test] fn empty_uri() { diff --git a/rust-runtime/aws-smithy-runtime-api/src/http/request.rs b/rust-runtime/aws-smithy-runtime-api/src/http/request.rs index eaf0105d45..701abbfce3 100644 --- a/rust-runtime/aws-smithy-runtime-api/src/http/request.rs +++ b/rust-runtime/aws-smithy-runtime-api/src/http/request.rs @@ -195,13 +195,6 @@ impl TryInto> for Request { } } -#[cfg(feature = "http-1x")] -impl From for Uri { - fn from(value: http_1x::Uri) -> Self { - Uri::from_http1x_uri(value) - } -} - impl Request { /// Converts this request into an http 0.x request. /// diff --git a/rust-runtime/aws-smithy-runtime/Cargo.toml b/rust-runtime/aws-smithy-runtime/Cargo.toml index 38ad79822b..cfab3977ac 100644 --- a/rust-runtime/aws-smithy-runtime/Cargo.toml +++ b/rust-runtime/aws-smithy-runtime/Cargo.toml @@ -31,7 +31,7 @@ wire-mock = ["test-util", "aws-smithy-http-client/wire-mock"] [dependencies] aws-smithy-async = { path = "../aws-smithy-async" } aws-smithy-http = { path = "../aws-smithy-http" } -aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["http-1x"] } +aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api" } aws-smithy-types = { path = "../aws-smithy-types", features = ["http-body-0-4-x"] } aws-smithy-http-client = { path = "../aws-smithy-http-client", optional = true } bytes = "1" diff --git a/rust-runtime/aws-smithy-types/src/body/http_body_1_x.rs b/rust-runtime/aws-smithy-types/src/body/http_body_1_x.rs index 8a35e331ae..2f777f4207 100644 --- a/rust-runtime/aws-smithy-types/src/body/http_body_1_x.rs +++ b/rust-runtime/aws-smithy-types/src/body/http_body_1_x.rs @@ -24,8 +24,6 @@ impl SdkBody { SdkBody::from_body_0_4_internal(Http1toHttp04::new(body.map_err(Into::into))) } - // FIXME(hyper1): this method name is confusing at best since it doesn't only return data - // frames pub(crate) fn poll_data_frame( mut self: Pin<&mut Self>, cx: &mut Context<'_>, diff --git a/rust-runtime/inlineable/Cargo.toml b/rust-runtime/inlineable/Cargo.toml index 3770a731a3..2b39b25854 100644 --- a/rust-runtime/inlineable/Cargo.toml +++ b/rust-runtime/inlineable/Cargo.toml @@ -28,9 +28,7 @@ aws-smithy-xml = { path = "../aws-smithy-xml" } bytes = "1" fastrand = "2.0.0" futures-util = "0.3.29" -# FIXME(hyper1) - due to the way codegen generates crate dependencies right now we have to match the codegen names used for theses -http-1x = { package = "http", version = "1" } -http = { package = "http", version = "0.2.9" } +http = "0.2.1" http-body = "0.4" md-5 = "0.10.0" once_cell = "1.16.0" From 6a3e1be49b5d4fb75a3e9e5d7ce6961945545137 Mon Sep 17 00:00:00 2001 From: Aaron J Todd Date: Thu, 7 Nov 2024 16:25:46 -0500 Subject: [PATCH 10/11] fix lint and revert temp change --- rust-runtime/aws-smithy-types/Cargo.toml | 3 +++ rust-runtime/inlineable/src/serialization_settings.rs | 10 ++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/rust-runtime/aws-smithy-types/Cargo.toml b/rust-runtime/aws-smithy-types/Cargo.toml index e98a16d323..66842a111b 100644 --- a/rust-runtime/aws-smithy-types/Cargo.toml +++ b/rust-runtime/aws-smithy-types/Cargo.toml @@ -93,3 +93,6 @@ harness = false [target."cfg(aws_sdk_unstable)".dependencies.serde] version = "1" features = ["derive"] + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(aws_sdk_unstable)'] } diff --git a/rust-runtime/inlineable/src/serialization_settings.rs b/rust-runtime/inlineable/src/serialization_settings.rs index c21de5731e..a00e38e6b4 100644 --- a/rust-runtime/inlineable/src/serialization_settings.rs +++ b/rust-runtime/inlineable/src/serialization_settings.rs @@ -5,6 +5,7 @@ #![allow(dead_code)] +use aws_smithy_http::header::set_request_header_if_absent; use aws_smithy_types::config_bag::{Storable, StoreReplace}; use http::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE}; @@ -51,14 +52,7 @@ impl HeaderSerializationSettings { value: &str, ) -> http::request::Builder { if self.include_header(&header_name) { - // TODO(hyper1) - revert back to use aws_smithy_http::header::set_request_header_if_absent once codegen is on http_1x types - if !request - .headers_ref() - .map(|map| map.contains_key(&header_name)) - .unwrap_or(false) - { - request = request.header(header_name, value) - } + request = set_request_header_if_absent(request, header_name, value); } request } From 2a7f6c46479afec4fd62093af229959da493d9ea Mon Sep 17 00:00:00 2001 From: Aaron J Todd Date: Fri, 8 Nov 2024 08:39:38 -0500 Subject: [PATCH 11/11] fix lints --- aws/rust-runtime/Cargo.lock | 17 +++++----- aws/rust-runtime/aws-config/Cargo.lock | 8 ++--- aws/sdk/Cargo.lock | 33 +++++++++---------- rust-runtime/Cargo.lock | 4 +-- .../aws-smithy-http-client/Cargo.toml | 3 ++ 5 files changed, 33 insertions(+), 32 deletions(-) diff --git a/aws/rust-runtime/Cargo.lock b/aws/rust-runtime/Cargo.lock index d3855065e1..1c4b1166a0 100644 --- a/aws/rust-runtime/Cargo.lock +++ b/aws/rust-runtime/Cargo.lock @@ -533,9 +533,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.36" +version = "1.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" +checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" dependencies = [ "jobserver", "libc", @@ -876,9 +876,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "ff" @@ -1267,13 +1267,12 @@ checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libfuzzer-sys" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +checksum = "9b9569d2f74e257076d8c6bfa73fb505b46b851e51ddaecc825944aa3bed17fa" dependencies = [ "arbitrary", "cc", - "once_cell", ] [[package]] @@ -2137,9 +2136,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", diff --git a/aws/rust-runtime/aws-config/Cargo.lock b/aws/rust-runtime/aws-config/Cargo.lock index 13de06fc23..ea15c6c311 100644 --- a/aws/rust-runtime/aws-config/Cargo.lock +++ b/aws/rust-runtime/aws-config/Cargo.lock @@ -456,9 +456,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.36" +version = "1.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" +checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" dependencies = [ "shlex", ] @@ -604,9 +604,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fnv" diff --git a/aws/sdk/Cargo.lock b/aws/sdk/Cargo.lock index 40bd383bae..c93b0cc865 100644 --- a/aws/sdk/Cargo.lock +++ b/aws/sdk/Cargo.lock @@ -102,7 +102,7 @@ dependencies = [ "async-task", "concurrent-queue", "fastrand 2.0.2", - "futures-lite 2.4.0", + "futures-lite 2.5.0", "slab", ] @@ -126,10 +126,10 @@ checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel 2.3.1", "async-executor", - "async-io 2.3.4", + "async-io 2.4.0", "async-lock 3.4.0", "blocking", - "futures-lite 2.4.0", + "futures-lite 2.5.0", "once_cell", ] @@ -155,15 +155,15 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" +checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" dependencies = [ "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.4.0", + "futures-lite 2.5.0", "parking", "polling 3.7.4", "rustix 0.38.39", @@ -226,7 +226,7 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.4", + "async-io 2.4.0", "async-lock 3.4.0", "atomic-waker", "cfg-if", @@ -246,13 +246,13 @@ checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" dependencies = [ "async-channel 1.9.0", "async-global-executor", - "async-io 2.3.4", + "async-io 2.4.0", "async-lock 3.4.0", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite 2.4.0", + "futures-lite 2.5.0", "gloo-timers", "kv-log-macro", "log", @@ -1831,7 +1831,7 @@ dependencies = [ "async-channel 2.3.1", "async-task", "futures-io", - "futures-lite 2.4.0", + "futures-lite 2.5.0", "piper", ] @@ -1899,9 +1899,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.36" +version = "1.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" +checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" dependencies = [ "jobserver", "libc", @@ -2442,9 +2442,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1fa2f9765705486b33fd2acf1577f8ec449c2ba1f318ae5447697b7c08d210" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ "fastrand 2.0.2", "futures-core", @@ -2957,13 +2957,12 @@ checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libfuzzer-sys" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +checksum = "9b9569d2f74e257076d8c6bfa73fb505b46b851e51ddaecc825944aa3bed17fa" dependencies = [ "arbitrary", "cc", - "once_cell", ] [[package]] diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index 75a21f85d1..021ef87c53 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -1033,9 +1033,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.36" +version = "1.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" +checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" dependencies = [ "jobserver", "libc", diff --git a/rust-runtime/aws-smithy-http-client/Cargo.toml b/rust-runtime/aws-smithy-http-client/Cargo.toml index 111fc3a60c..718ec0e770 100644 --- a/rust-runtime/aws-smithy-http-client/Cargo.toml +++ b/rust-runtime/aws-smithy-http-client/Cargo.toml @@ -137,3 +137,6 @@ targets = ["x86_64-unknown-linux-gnu"] cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"] rustdoc-args = ["--cfg", "docsrs"] # End of docs.rs metadata + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(crypto_unstable)'] }