Unverified Commit 327e31e5 authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

disable content length enforcement (#3524)

https://github.com/smithy-lang/smithy-rs/issues/3523

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent f97e6f3b
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -11,12 +11,6 @@
# meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"}
# author = "rcoh"

[[smithy-rs]]
message = "Clients now enforce that the Content-Length sent by the server matches the length of the returned response body. In most cases, Hyper will enforce this behavior, however, in extremely rare circumstances where the Tokio runtime is dropped in between subsequent requests, this scenario can occur."
references = ["smithy-rs#3491", "aws-sdk-rust#1079"]
meta = { "breaking" = false, "bug" = true, "tada" = false }
author = "rcoh"

[[aws-sdk-rust]]
message = "Make `BehaviorVersion` be future-proof by disallowing it to be constructed via the `BehaviorVersion {}` syntax."
references = ["aws-sdk-rust#1111", "smithy-rs#3513"]
+2 −0
Original line number Diff line number Diff line
@@ -18,7 +18,9 @@ use std::net::SocketAddr;
use std::time::Duration;
use tracing::debug;

// TODO(https://github.com/smithy-lang/smithy-rs/issues/3523): Unignore this test
#[tokio::test]
#[should_panic]
async fn test_too_short_body_causes_an_error() {
    // this is almost impossible to reproduce with Hyper—you need to do stuff like run each request
    // in its own async runtime. But there's no reason a customer couldn't run their _own_ HttpClient
+1 −1
Original line number Diff line number Diff line
[package]
name = "aws-smithy-runtime"
version = "1.2.0"
version = "1.2.1"
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Zelda Hessler <zhessler@amazon.com>"]
description = "The new smithy runtime crate"
edition = "2021"
+4 −1
Original line number Diff line number Diff line
@@ -203,6 +203,8 @@ fn default_stalled_stream_protection_config_plugin_v2(
    )
}

// TODO(https://github.com/smithy-lang/smithy-rs/issues/3523)
#[allow(dead_code)]
fn enforce_content_length_runtime_plugin() -> Option<SharedRuntimePlugin> {
    Some(EnforceContentLengthRuntimePlugin::new().into_shared())
}
@@ -283,8 +285,9 @@ pub fn default_plugins(
        default_sleep_impl_plugin(),
        default_time_source_plugin(),
        default_timeout_config_plugin(),
        // TODO(https://github.com/smithy-lang/smithy-rs/issues/3523): Reenable this
        /* enforce_content_length_runtime_plugin(), */
        default_stalled_stream_protection_config_plugin_v2(behavior_version),
        enforce_content_length_runtime_plugin(),
    ]
    .into_iter()
    .flatten()
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ runtime-versioner patch-runtime \

# Testing just a small subset of the full SDK to check for semver hazards
echo -e "${C_YELLOW}# Testing SDK...${C_RESET}"
for sdk in dynamodb s3; do
for sdk in dynamodb s3 aws-config; do
  echo -e "${C_YELLOW}# Testing ${sdk}...${C_RESET}"
  pushd "aws-sdk-rust/sdk/${sdk}" &>/dev/null
  cargo test --all-features