AWS SDK

AWS SDK

rev. ee474c7509d7728618c23068f3741e8e5b339ef9

Files changed:

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-checksums/src/body/calculate.rs

@@ -1,1 +188,197 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
    6      6   
//! Functionality for calculating the checksum of an HTTP body and emitting it as trailers.
    7      7   
    8      8   
use super::ChecksumCache;
    9      9   
use crate::http::HttpChecksum;
   10     10   
   11         -
use aws_smithy_http::header::append_merge_header_maps;
          11  +
use aws_smithy_http::header::append_merge_header_maps_http_1x;
   12     12   
use aws_smithy_types::body::SdkBody;
   13         -
   14         -
use http::HeaderMap;
   15         -
use http_body::SizeHint;
   16     13   
use pin_project_lite::pin_project;
   17         -
   18     14   
use std::pin::Pin;
   19     15   
use std::task::{Context, Poll};
   20     16   
use tracing::warn;
   21     17   
   22     18   
pin_project! {
   23     19   
    /// A body-wrapper that will calculate the `InnerBody`'s checksum and emit it as a trailer.
   24     20   
    pub struct ChecksumBody<InnerBody> {
   25     21   
            #[pin]
   26     22   
            body: InnerBody,
   27     23   
            checksum: Option<Box<dyn HttpChecksum>>,
          24  +
            written_trailers: bool,
   28     25   
            cache: Option<ChecksumCache>
   29     26   
    }
   30     27   
}
   31     28   
   32     29   
impl ChecksumBody<SdkBody> {
   33     30   
    /// Given an `SdkBody` and a `Box<dyn HttpChecksum>`, create a new `ChecksumBody<SdkBody>`.
   34     31   
    pub fn new(body: SdkBody, checksum: Box<dyn HttpChecksum>) -> Self {
   35     32   
        Self {
   36     33   
            body,
   37     34   
            checksum: Some(checksum),
          35  +
            written_trailers: false,
   38     36   
            cache: None,
   39     37   
        }
   40     38   
    }
   41     39   
   42     40   
    /// Configure a cache for this body.
   43     41   
    ///
   44     42   
    /// When used across multiple requests (e.g. retries) a cached checksum previously
   45     43   
    /// calculated will be favored if available.
   46     44   
    pub fn with_cache(self, cache: ChecksumCache) -> Self {
   47     45   
        Self {
   48     46   
            body: self.body,
   49     47   
            checksum: self.checksum,
          48  +
            written_trailers: false,
   50     49   
            cache: Some(cache),
   51     50   
        }
   52     51   
    }
   53         -
}
   54         -
   55         -
impl http_body::Body for ChecksumBody<SdkBody> {
   56         -
    type Data = bytes::Bytes;
   57         -
    type Error = aws_smithy_types::body::Error;
   58     52   
   59         -
    fn poll_data(
   60         -
        self: Pin<&mut Self>,
   61         -
        cx: &mut Context<'_>,
   62         -
    ) -> Poll<Option<Result<Self::Data, Self::Error>>> {
   63         -
        let this = self.project();
   64         -
        match this.checksum {
   65         -
            Some(checksum) => {
   66         -
                let poll_res = this.body.poll_data(cx);
   67         -
                if let Poll::Ready(Some(Ok(data))) = &poll_res {
   68         -
                    checksum.update(data);
          53  +
    // It would be nicer if this could take &self, but I couldn't make that
          54  +
    // work out with the Pin/Projection types, so its a static method for now
          55  +
    fn extract_or_set_cached_headers(
          56  +
        maybe_cache: &Option<ChecksumCache>,
          57  +
        checksum: Box<dyn HttpChecksum>,
          58  +
    ) -> http_1x::HeaderMap {
          59  +
        let calculated_headers = checksum.headers();
          60  +
        if let Some(cache) = maybe_cache {
          61  +
            if let Some(cached_headers) = cache.get() {
          62  +
                if cached_headers != calculated_headers {
          63  +
                    warn!(cached = ?cached_headers, calculated = ?calculated_headers, "calculated checksum differs from cached checksum!");
   69     64   
                }
   70         -
   71         -
                poll_res
          65  +
                cached_headers
          66  +
            } else {
          67  +
                cache.set(calculated_headers.clone());
          68  +
                calculated_headers
   72     69   
            }
   73         -
            None => unreachable!("This can only fail if poll_data is called again after poll_trailers, which is invalid"),
          70  +
        } else {
          71  +
            calculated_headers
   74     72   
        }
   75     73   
    }
          74  +
}
          75  +
          76  +
impl http_body_1x::Body for ChecksumBody<SdkBody> {
          77  +
    type Data = bytes::Bytes;
          78  +
    type Error = aws_smithy_types::body::Error;
   76     79   
   77         -
    fn poll_trailers(
          80  +
    fn poll_frame(
   78     81   
        self: Pin<&mut Self>,
   79     82   
        cx: &mut Context<'_>,
   80         -
    ) -> Poll<Result<Option<HeaderMap>, Self::Error>> {
          83  +
    ) -> Poll<Option<Result<http_body_1x::Frame<Self::Data>, Self::Error>>> {
   81     84   
        let this = self.project();
   82         -
        let poll_res = this.body.poll_trailers(cx);
   83         -
   84         -
        if let Poll::Ready(Ok(maybe_inner_trailers)) = poll_res {
   85         -
            let checksum_headers = if let Some(checksum) = this.checksum.take() {
   86         -
                let calculated_headers = checksum.headers();
   87         -
   88         -
                if let Some(cache) = this.cache {
   89         -
                    if let Some(cached_headers) = cache.get() {
   90         -
                        if cached_headers != calculated_headers {
   91         -
                            warn!(cached = ?cached_headers, calculated = ?calculated_headers, "calculated checksum differs from cached checksum!");
   92         -
                        }
   93         -
                        cached_headers
   94         -
                    } else {
   95         -
                        cache.set(calculated_headers.clone());
   96         -
                        calculated_headers
          85  +
        let poll_res = this.body.poll_frame(cx);
          86  +
          87  +
        match &poll_res {
          88  +
            Poll::Ready(Some(Ok(frame))) => {
          89  +
                // Update checksum for data frames
          90  +
                if frame.is_data() {
          91  +
                    if let Some(checksum) = this.checksum {
          92  +
                        checksum.update(frame.data_ref().expect("Data frame has data"));
   97     93   
                    }
   98     94   
                } else {
   99         -
                    calculated_headers
          95  +
                    // Add checksum trailer to other trailers if necessary
          96  +
                    let checksum_headers = if let Some(checksum) = this.checksum.take() {
          97  +
                        ChecksumBody::extract_or_set_cached_headers(this.cache, checksum)
          98  +
                    } else {
          99  +
                        return Poll::Ready(None);
         100  +
                    };
         101  +
                    let trailers = frame
         102  +
                        .trailers_ref()
         103  +
                        .expect("Trailers frame has trailers")
         104  +
                        .clone();
         105  +
                    *this.written_trailers = true;
         106  +
                    return Poll::Ready(Some(Ok(http_body_1x::Frame::trailers(
         107  +
                        append_merge_header_maps_http_1x(trailers, checksum_headers),
         108  +
                    ))));
  100    109   
                }
  101         -
            } else {
  102         -
                return Poll::Ready(Ok(None));
  103         -
            };
  104         -
  105         -
            return match maybe_inner_trailers {
  106         -
                Some(inner_trailers) => Poll::Ready(Ok(Some(append_merge_header_maps(
  107         -
                    inner_trailers,
  108         -
                    checksum_headers,
  109         -
                )))),
  110         -
                None => Poll::Ready(Ok(Some(checksum_headers))),
  111         -
            };
  112         -
        }
  113         -
         110  +
            }
         111  +
            Poll::Ready(None) => {
         112  +
                // If the trailers have not already been written (because there were no existing
         113  +
                // trailers on the body) we write them here
         114  +
                if !*this.written_trailers {
         115  +
                    let checksum_headers = if let Some(checksum) = this.checksum.take() {
         116  +
                        ChecksumBody::extract_or_set_cached_headers(this.cache, checksum)
         117  +
                    } else {
         118  +
                        return Poll::Ready(None);
         119  +
                    };
         120  +
                    let trailers = http_1x::HeaderMap::new();
         121  +
                    return Poll::Ready(Some(Ok(http_body_1x::Frame::trailers(
         122  +
                        append_merge_header_maps_http_1x(trailers, checksum_headers),
         123  +
                    ))));
         124  +
                }
         125  +
            }
         126  +
            _ => {}
         127  +
        };
  114    128   
        poll_res
  115    129   
    }
  116         -
  117         -
    fn is_end_stream(&self) -> bool {
  118         -
        // If inner body is finished and we've already consumed the checksum then we must be
  119         -
        // at the end of the stream.
  120         -
        self.body.is_end_stream() && self.checksum.is_none()
  121         -
    }
  122         -
  123         -
    fn size_hint(&self) -> SizeHint {
  124         -
        self.body.size_hint()
  125         -
    }
  126    130   
}
  127    131   
  128    132   
#[cfg(test)]
  129    133   
mod tests {
  130    134   
    use super::ChecksumBody;
  131    135   
    use crate::{http::CRC_32_HEADER_NAME, ChecksumAlgorithm, CRC_32_NAME};
  132    136   
    use aws_smithy_types::base64;
  133    137   
    use aws_smithy_types::body::SdkBody;
  134    138   
    use bytes::Buf;
  135    139   
    use bytes_utils::SegmentedBuf;
  136         -
    use http_body::Body;
         140  +
    use http_1x::HeaderMap;
         141  +
    use http_body_util::BodyExt;
  137    142   
    use std::fmt::Write;
  138    143   
    use std::io::Read;
  139    144   
  140         -
    fn header_value_as_checksum_string(header_value: &http::HeaderValue) -> String {
         145  +
    fn header_value_as_checksum_string(header_value: &http_1x::HeaderValue) -> String {
  141    146   
        let decoded_checksum = base64::decode(header_value.to_str().unwrap()).unwrap();
  142    147   
        let decoded_checksum = decoded_checksum
  143    148   
            .into_iter()
  144    149   
            .fold(String::new(), |mut acc, byte| {
  145    150   
                write!(acc, "{byte:02X?}").expect("string will always be writeable");
  146    151   
                acc
  147    152   
            });
  148    153   
  149    154   
        format!("0x{decoded_checksum}")
  150    155   
    }
  151    156   
  152    157   
    #[tokio::test]
  153    158   
    async fn test_checksum_body() {
  154    159   
        let input_text = "This is some test text for an SdkBody";
  155    160   
        let body = SdkBody::from(input_text);
  156    161   
        let checksum = CRC_32_NAME
  157    162   
            .parse::<ChecksumAlgorithm>()
  158    163   
            .unwrap()
  159    164   
            .into_impl();
  160    165   
        let mut body = ChecksumBody::new(body, checksum);
  161    166   
  162         -
        let mut output = SegmentedBuf::new();
  163         -
        while let Some(buf) = body.data().await {
  164         -
            output.push(buf.unwrap());
         167  +
        let mut output_data = SegmentedBuf::new();
         168  +
        let mut trailers = HeaderMap::new();
         169  +
        while let Some(buf) = body.frame().await {
         170  +
            let buf = buf.unwrap();
         171  +
            if buf.is_data() {
         172  +
                output_data.push(buf.into_data().unwrap());
         173  +
            } else if buf.is_trailers() {
         174  +
                let map = buf.into_trailers().unwrap();
         175  +
                map.into_iter().for_each(|(k, v)| {
         176  +
                    trailers.insert(k.unwrap(), v);
         177  +
                });
         178  +
            }
  165    179   
        }
  166    180   
  167    181   
        let mut output_text = String::new();
  168         -
        output
         182  +
        output_data
  169    183   
            .reader()
  170    184   
            .read_to_string(&mut output_text)
  171    185   
            .expect("Doesn't cause IO errors");
  172    186   
        // Verify data is complete and unaltered
  173    187   
        assert_eq!(input_text, output_text);
  174    188   
  175         -
        let trailers = body
  176         -
            .trailers()
  177         -
            .await
  178         -
            .expect("checksum generation was without error")
  179         -
            .expect("trailers were set");
  180    189   
        let checksum_trailer = trailers
  181    190   
            .get(CRC_32_HEADER_NAME)
  182    191   
            .expect("trailers contain crc32 checksum");
  183    192   
        let checksum_trailer = header_value_as_checksum_string(checksum_trailer);
  184    193   
  185    194   
        // Known correct checksum for the input "This is some test text for an SdkBody"
  186    195   
        assert_eq!("0x99B01F72", checksum_trailer);
  187    196   
    }
  188    197   
}

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-checksums/src/body/validate.rs

@@ -1,1 +223,208 @@
    4      4   
 */
    5      5   
    6      6   
//! Functionality for validating an HTTP body against a given precalculated checksum and emitting an
    7      7   
//! error if it doesn't match.
    8      8   
    9      9   
use crate::http::HttpChecksum;
   10     10   
   11     11   
use aws_smithy_types::body::SdkBody;
   12     12   
   13     13   
use bytes::Bytes;
   14         -
use http::{HeaderMap, HeaderValue};
   15         -
use http_body::SizeHint;
   16     14   
use pin_project_lite::pin_project;
   17     15   
   18     16   
use std::fmt::Display;
   19     17   
use std::pin::Pin;
   20     18   
use std::task::{Context, Poll};
   21     19   
   22     20   
pin_project! {
   23     21   
    /// A body-wrapper that will calculate the `InnerBody`'s checksum and emit an error if it
   24     22   
    /// doesn't match the precalculated checksum.
   25     23   
    pub struct ChecksumBody<InnerBody> {
   26     24   
        #[pin]
   27     25   
        inner: InnerBody,
   28     26   
        checksum: Option<Box<dyn HttpChecksum>>,
   29     27   
        precalculated_checksum: Bytes,
   30     28   
    }
   31     29   
}
   32     30   
   33     31   
impl ChecksumBody<SdkBody> {
   34     32   
    /// Given an `SdkBody`, a `Box<dyn HttpChecksum>`, and a precalculated checksum represented
   35     33   
    /// as `Bytes`, create a new `ChecksumBody<SdkBody>`.
   36     34   
    pub fn new(
   37     35   
        body: SdkBody,
   38     36   
        checksum: Box<dyn HttpChecksum>,
   39     37   
        precalculated_checksum: Bytes,
   40     38   
    ) -> Self {
   41     39   
        Self {
   42     40   
            inner: body,
   43     41   
            checksum: Some(checksum),
   44     42   
            precalculated_checksum,
   45     43   
        }
   46     44   
    }
   47     45   
   48     46   
    fn poll_inner(
   49     47   
        self: Pin<&mut Self>,
   50     48   
        cx: &mut Context<'_>,
   51         -
    ) -> Poll<Option<Result<Bytes, aws_smithy_types::body::Error>>> {
   52         -
        use http_body::Body;
          49  +
    ) -> Poll<Option<Result<http_body_1x::Frame<Bytes>, aws_smithy_types::body::Error>>> {
          50  +
        use http_body_1x::Body;
   53     51   
   54     52   
        let this = self.project();
   55     53   
        let checksum = this.checksum;
   56     54   
   57         -
        match this.inner.poll_data(cx) {
   58         -
            Poll::Ready(Some(Ok(data))) => {
          55  +
        match this.inner.poll_frame(cx) {
          56  +
            Poll::Ready(Some(Ok(frame))) => {
          57  +
                let data = frame.data_ref().expect("Data frame should have data");
   59     58   
                tracing::trace!(
   60     59   
                    "reading {} bytes from the body and updating the checksum calculation",
   61     60   
                    data.len()
   62     61   
                );
   63     62   
                let checksum = match checksum.as_mut() {
   64     63   
                    Some(checksum) => checksum,
   65     64   
                    None => {
   66     65   
                        unreachable!("The checksum must exist because it's only taken out once the inner body has been completely polled.");
   67     66   
                    }
   68     67   
                };
   69     68   
   70         -
                checksum.update(&data);
   71         -
                Poll::Ready(Some(Ok(data)))
          69  +
                checksum.update(data);
          70  +
                Poll::Ready(Some(Ok(frame)))
   72     71   
            }
   73     72   
            // Once the inner body has stopped returning data, check the checksum
   74     73   
            // and return an error if it doesn't match.
   75     74   
            Poll::Ready(None) => {
   76     75   
                tracing::trace!("finished reading from body, calculating final checksum");
   77     76   
                let checksum = match checksum.take() {
   78     77   
                    Some(checksum) => checksum,
   79     78   
                    None => {
   80     79   
                        // If the checksum was already taken and this was polled again anyways,
   81     80   
                        // then return nothing
   82     81   
                        return Poll::Ready(None);
   83     82   
                    }
   84     83   
                };
   85     84   
   86     85   
                let actual_checksum = checksum.finalize();
   87     86   
                if *this.precalculated_checksum == actual_checksum {
   88     87   
                    Poll::Ready(None)
   89     88   
                } else {
   90     89   
                    // So many parens it's starting to look like LISP
   91     90   
                    Poll::Ready(Some(Err(Box::new(Error::ChecksumMismatch {
   92     91   
                        expected: this.precalculated_checksum.clone(),
   93     92   
                        actual: actual_checksum,
   94     93   
                    }))))
   95     94   
                }
   96     95   
            }
   97     96   
            Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))),
   98     97   
            Poll::Pending => Poll::Pending,
   99     98   
        }
  100     99   
    }
  101    100   
}
  102    101   
  103    102   
/// Errors related to checksum calculation and validation
  104    103   
#[derive(Debug, Eq, PartialEq)]
  105    104   
#[non_exhaustive]
  106    105   
pub enum Error {
  107    106   
    /// The actual checksum didn't match the expected checksum. The checksummed data has been
  108    107   
    /// altered since the expected checksum was calculated.
  109    108   
    ChecksumMismatch { expected: Bytes, actual: Bytes },
  110    109   
}
  111    110   
  112    111   
impl Display for Error {
  113    112   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
  114    113   
        match self {
  115    114   
            Error::ChecksumMismatch { expected, actual } => write!(
  116    115   
                f,
  117    116   
                "body checksum mismatch. expected body checksum to be {} but it was {}",
  118    117   
                hex::encode(expected),
  119    118   
                hex::encode(actual)
  120    119   
            ),
  121    120   
        }
  122    121   
    }
  123    122   
}
  124    123   
  125    124   
impl std::error::Error for Error {}
  126    125   
  127         -
impl http_body::Body for ChecksumBody<SdkBody> {
         126  +
impl http_body_1x::Body for ChecksumBody<SdkBody> {
  128    127   
    type Data = Bytes;
  129    128   
    type Error = aws_smithy_types::body::Error;
  130    129   
  131         -
    fn poll_data(
         130  +
    fn poll_frame(
  132    131   
        self: Pin<&mut Self>,
  133    132   
        cx: &mut Context<'_>,
  134         -
    ) -> Poll<Option<Result<Self::Data, Self::Error>>> {
         133  +
    ) -> Poll<Option<Result<http_body_1x::Frame<Self::Data>, Self::Error>>> {
  135    134   
        self.poll_inner(cx)
  136    135   
    }
  137         -
  138         -
    fn poll_trailers(
  139         -
        self: Pin<&mut Self>,
  140         -
        cx: &mut Context<'_>,
  141         -
    ) -> Poll<Result<Option<HeaderMap<HeaderValue>>, Self::Error>> {
  142         -
        self.project().inner.poll_trailers(cx)
  143         -
    }
  144         -
  145         -
    fn is_end_stream(&self) -> bool {
  146         -
        self.checksum.is_none()
  147         -
    }
  148         -
  149         -
    fn size_hint(&self) -> SizeHint {
  150         -
        self.inner.size_hint()
  151         -
    }
  152    136   
}
  153    137   
  154    138   
#[cfg(test)]
  155    139   
mod tests {
  156    140   
    use crate::body::validate::{ChecksumBody, Error};
  157    141   
    use crate::ChecksumAlgorithm;
  158    142   
    use aws_smithy_types::body::SdkBody;
  159    143   
    use bytes::{Buf, Bytes};
  160    144   
    use bytes_utils::SegmentedBuf;
  161         -
    use http_body::Body;
         145  +
    use http_body_util::BodyExt;
  162    146   
    use std::io::Read;
  163    147   
  164    148   
    fn calculate_crc32_checksum(input: &str) -> Bytes {
  165    149   
        let checksum =
  166    150   
            crc_fast::checksum(crc_fast::CrcAlgorithm::Crc32IsoHdlc, input.as_bytes()) as u32;
  167    151   
  168    152   
        Bytes::copy_from_slice(&checksum.to_be_bytes())
  169    153   
    }
  170    154   
  171    155   
    #[tokio::test]
  172    156   
    async fn test_checksum_validated_body_errors_on_mismatch() {
  173    157   
        let input_text = "This is some test text for an SdkBody";
  174    158   
        let actual_checksum = calculate_crc32_checksum(input_text);
  175    159   
        let body = SdkBody::from(input_text);
  176    160   
        let non_matching_checksum = Bytes::copy_from_slice(&[0x00, 0x00, 0x00, 0x00]);
  177    161   
        let mut body = ChecksumBody::new(
  178    162   
            body,
  179    163   
            "crc32".parse::<ChecksumAlgorithm>().unwrap().into_impl(),
  180    164   
            non_matching_checksum.clone(),
  181    165   
        );
  182    166   
  183         -
        while let Some(data) = body.data().await {
         167  +
        while let Some(data) = body.frame().await {
  184    168   
            match data {
  185    169   
                Ok(_) => { /* Do nothing */ }
  186    170   
                Err(e) => {
  187    171   
                    match e.downcast_ref::<Error>().unwrap() {
  188    172   
                        Error::ChecksumMismatch { expected, actual } => {
  189    173   
                            assert_eq!(expected, &non_matching_checksum);
  190    174   
                            assert_eq!(actual, &actual_checksum);
  191    175   
                        }
  192    176   
                    }
  193    177   
  194    178   
                    return;
  195    179   
                }
  196    180   
            }
  197    181   
        }
  198    182   
  199    183   
        panic!("didn't hit expected error condition");
  200    184   
    }
  201    185   
  202    186   
    #[tokio::test]
  203    187   
    async fn test_checksum_validated_body_succeeds_on_match() {
  204    188   
        let input_text = "This is some test text for an SdkBody";
  205    189   
        let actual_checksum = calculate_crc32_checksum(input_text);
  206    190   
        let body = SdkBody::from(input_text);
  207    191   
        let http_checksum = "crc32".parse::<ChecksumAlgorithm>().unwrap().into_impl();
  208    192   
        let mut body = ChecksumBody::new(body, http_checksum, actual_checksum);
  209    193   
  210    194   
        let mut output = SegmentedBuf::new();
  211         -
        while let Some(buf) = body.data().await {
  212         -
            output.push(buf.unwrap());
         195  +
        while let Some(buf) = body.frame().await {
         196  +
            let data = buf.unwrap().into_data().unwrap();
         197  +
            output.push(data);
  213    198   
        }
  214    199   
  215    200   
        let mut output_text = String::new();
  216    201   
        output
  217    202   
            .reader()
  218    203   
            .read_to_string(&mut output_text)
  219    204   
            .expect("Doesn't cause IO errors");
  220    205   
        // Verify data is complete and unaltered
  221    206   
        assert_eq!(input_text, output_text);
  222    207   
    }

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-checksums/src/http.rs

@@ -1,1 +87,86 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
    6      6   
//! Checksum support for HTTP requests and responses.
    7      7   
    8      8   
use aws_smithy_types::base64;
    9         -
use http::header::{HeaderMap, HeaderValue};
   10      9   
   11     10   
use crate::Crc64Nvme;
   12     11   
use crate::{
   13     12   
    Checksum, Crc32, Crc32c, Md5, Sha1, Sha256, CRC_32_C_NAME, CRC_32_NAME, CRC_64_NVME_NAME,
   14     13   
    SHA_1_NAME, SHA_256_NAME,
   15     14   
};
   16     15   
   17     16   
pub const CRC_32_HEADER_NAME: &str = "x-amz-checksum-crc32";
   18     17   
pub const CRC_32_C_HEADER_NAME: &str = "x-amz-checksum-crc32c";
   19     18   
pub const SHA_1_HEADER_NAME: &str = "x-amz-checksum-sha1";
   20     19   
pub const SHA_256_HEADER_NAME: &str = "x-amz-checksum-sha256";
   21     20   
pub const CRC_64_NVME_HEADER_NAME: &str = "x-amz-checksum-crc64nvme";
   22     21   
   23     22   
// Preserved for compatibility purposes. This should never be used by users, only within smithy-rs
   24     23   
#[warn(dead_code)]
   25     24   
pub(crate) static MD5_HEADER_NAME: &str = "content-md5";
   26     25   
   27     26   
/// When a response has to be checksum-verified, we have to check possible headers until we find the
   28     27   
/// header with the precalculated checksum. Because a service may send back multiple headers, we have
   29     28   
/// to check them in order based on how fast each checksum is to calculate.
   30     29   
pub const CHECKSUM_ALGORITHMS_IN_PRIORITY_ORDER: [&str; 5] = [
   31     30   
    CRC_64_NVME_NAME,
   32     31   
    CRC_32_C_NAME,
   33     32   
    CRC_32_NAME,
   34     33   
    SHA_1_NAME,
   35     34   
    SHA_256_NAME,
   36     35   
];
   37     36   
   38     37   
/// Checksum algorithms are use to validate the integrity of data. Structs that implement this trait
   39     38   
/// can be used as checksum calculators. This trait requires Send + Sync because these checksums are
   40     39   
/// often used in a threaded context.
   41     40   
pub trait HttpChecksum: Checksum + Send + Sync {
   42         -
    /// Either return this checksum as a `HeaderMap` containing one HTTP header, or return an error
          41  +
    /// Either return this checksum as a http-02x `HeaderMap` containing one HTTP header, or return an error
   43     42   
    /// describing why checksum calculation failed.
   44         -
    fn headers(self: Box<Self>) -> HeaderMap<HeaderValue> {
   45         -
        let mut header_map = HeaderMap::new();
          43  +
    fn headers(self: Box<Self>) -> http_1x::HeaderMap<http_1x::HeaderValue> {
          44  +
        let mut header_map = http_1x::HeaderMap::new();
   46     45   
        header_map.insert(self.header_name(), self.header_value());
   47     46   
   48     47   
        header_map
   49     48   
    }
   50     49   
   51     50   
    /// Return the `HeaderName` used to represent this checksum algorithm
   52     51   
    fn header_name(&self) -> &'static str;
   53     52   
   54         -
    /// Return the calculated checksum as a base64-encoded `HeaderValue`
   55         -
    fn header_value(self: Box<Self>) -> HeaderValue {
          53  +
    /// Return the calculated checksum as a base64-encoded http-02x `HeaderValue`
          54  +
    fn header_value(self: Box<Self>) -> http_1x::HeaderValue {
   56     55   
        let hash = self.finalize();
   57         -
        HeaderValue::from_str(&base64::encode(&hash[..]))
          56  +
        http_1x::HeaderValue::from_str(&base64::encode(&hash[..]))
   58     57   
            .expect("base64 encoded bytes are always valid header values")
   59     58   
    }
   60     59   
   61     60   
    /// Return the total size of
   62     61   
    /// - The `HeaderName`
   63     62   
    /// - The header name/value separator
   64     63   
    /// - The base64-encoded `HeaderValue`
   65     64   
    fn size(&self) -> u64 {
   66     65   
        let trailer_name_size_in_bytes = self.header_name().len();
   67     66   
        let base64_encoded_checksum_size_in_bytes =

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-checksums/src/lib.rs

@@ -350,350 +410,410 @@
  370    370   
            CRC_32_C_HEADER_NAME, CRC_32_HEADER_NAME, MD5_HEADER_NAME, SHA_1_HEADER_NAME,
  371    371   
            SHA_256_HEADER_NAME,
  372    372   
        },
  373    373   
        Crc32, Crc32c, Md5, Sha1, Sha256,
  374    374   
    };
  375    375   
  376    376   
    use crate::http::HttpChecksum;
  377    377   
    use crate::ChecksumAlgorithm;
  378    378   
  379    379   
    use aws_smithy_types::base64;
  380         -
    use http::HeaderValue;
         380  +
    use http_1x::HeaderValue;
  381    381   
    use pretty_assertions::assert_eq;
  382    382   
    use std::fmt::Write;
  383    383   
  384    384   
    const TEST_DATA: &str = r#"test data"#;
  385    385   
  386    386   
    fn base64_encoded_checksum_to_hex_string(header_value: &HeaderValue) -> String {
  387    387   
        let decoded_checksum = base64::decode(header_value.to_str().unwrap()).unwrap();
  388    388   
        let decoded_checksum = decoded_checksum
  389    389   
            .into_iter()
  390    390   
            .fold(String::new(), |mut acc, byte| {

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-compression/Cargo.toml

@@ -1,1 +66,51 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-compression"
    4         -
version = "0.0.7"
           4  +
version = "0.0.8"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Zelda Hessler <zhessler@amazon.com>"]
    6      6   
description = "Request compression for smithy clients."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
rust-version = "1.88"
   11     11   
[package.metadata.docs.rs]
   12     12   
all-features = true
   13     13   
targets = ["x86_64-unknown-linux-gnu"]
   14     14   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   15     15   
rustdoc-args = ["--cfg", "docsrs"]
   16     16   
   17     17   
[features]
   18         -
http-body-0-4-x = ["dep:http-body-0-4", "dep:http-0-2", "aws-smithy-types/http-body-0-4-x"]
   19         -
http-body-1-x = ["dep:http-body-1-0", "dep:http-1-0", "dep:http-body-util", "aws-smithy-types/http-body-1-x"]
   20     18   
   21     19   
[dependencies]
   22     20   
bytes = "1.10.0"
   23     21   
flate2 = "1.0.30"
   24     22   
futures-util = "0.3"
   25     23   
pin-project-lite = "0.2.14"
   26     24   
tracing = "0.1.40"
   27     25   
   28     26   
[dependencies.aws-smithy-types]
   29     27   
path = "../aws-smithy-types"
   30         -
version = "1.3.6"
          28  +
version = "1.4.0"
   31     29   
   32     30   
[dependencies.aws-smithy-runtime-api]
   33     31   
path = "../aws-smithy-runtime-api"
   34         -
version = "1.10.0"
          32  +
version = "1.11.0"
   35     33   
   36         -
[dependencies.http-0-2]
          34  +
[dependencies.http-1x]
   37     35   
package = "http"
   38         -
version = "0.2.9"
   39         -
optional = true
          36  +
version = "1.3.1"
   40     37   
   41         -
[dependencies.http-1-0]
   42         -
package = "http"
   43         -
version = "1"
   44         -
optional = true
   45         -
   46         -
[dependencies.http-body-0-4]
   47         -
package = "http-body"
   48         -
version = "0.4.5"
   49         -
optional = true
   50         -
   51         -
[dependencies.http-body-1-0]
          38  +
[dependencies.http-body-1x]
   52     39   
package = "http-body"
   53         -
version = "1"
   54         -
optional = true
          40  +
version = "1.0.1"
   55     41   
   56     42   
[dependencies.http-body-util]
   57         -
version = "0.1.2"
   58         -
optional = true
          43  +
version = "0.1.3"
   59     44   
   60     45   
[dev-dependencies]
   61     46   
bytes-utils = "0.1.2"
   62     47   
pretty_assertions = "1.3"
   63     48   
   64     49   
[dev-dependencies.tokio]
   65     50   
version = "1.23.1"
   66     51   
features = ["macros", "rt"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-compression/src/body.rs

@@ -9,9 +264,154 @@
   29     29   
        /// Given an [`SdkBody`] and a `Box<dyn CompressRequest>`, create a new `CompressedBody<SdkBody, CR>`.
   30     30   
        pub fn new(body: SdkBody, compress_request: CR) -> Self {
   31     31   
            Self {
   32     32   
                body,
   33     33   
                compress_request,
   34     34   
                is_end_stream: false,
   35     35   
            }
   36     36   
        }
   37     37   
    }
   38     38   
   39         -
    /// Support for the `http-body-0-4` and `http-0-2` crates.
   40         -
    #[cfg(feature = "http-body-0-4-x")]
   41         -
    pub mod http_body_0_4_x {
   42         -
        use super::CompressedBody;
   43         -
        use crate::http::http_body_0_4_x::CompressRequest;
   44         -
        use aws_smithy_runtime_api::box_error::BoxError;
   45         -
        use aws_smithy_types::body::SdkBody;
   46         -
        use http_0_2::HeaderMap;
   47         -
        use http_body_0_4::{Body, SizeHint};
   48         -
        use std::pin::Pin;
   49         -
        use std::task::{Context, Poll};
   50         -
   51         -
        impl Body for CompressedBody<SdkBody, Box<dyn CompressRequest>> {
   52         -
            type Data = bytes::Bytes;
   53         -
            type Error = aws_smithy_types::body::Error;
   54         -
   55         -
            fn poll_data(
   56         -
                self: Pin<&mut Self>,
   57         -
                cx: &mut Context<'_>,
   58         -
            ) -> Poll<Option<Result<Self::Data, Self::Error>>> {
   59         -
                let this = self.project();
   60         -
                match this.body.poll_data(cx)? {
   61         -
                    Poll::Ready(Some(data)) => {
   62         -
                        let mut out = Vec::new();
   63         -
                        this.compress_request.compress_bytes(&data[..], &mut out)?;
   64         -
                        Poll::Ready(Some(Ok(out.into())))
   65         -
                    }
   66         -
                    Poll::Ready(None) => {
   67         -
                        *this.is_end_stream = true;
   68         -
                        Poll::Ready(None)
   69         -
                    }
   70         -
                    Poll::Pending => Poll::Pending,
   71         -
                }
   72         -
            }
   73         -
   74         -
            fn poll_trailers(
   75         -
                self: Pin<&mut Self>,
   76         -
                cx: &mut Context<'_>,
   77         -
            ) -> Poll<Result<Option<HeaderMap>, Self::Error>> {
   78         -
                let this = self.project();
   79         -
                this.body.poll_trailers(cx)
   80         -
            }
   81         -
   82         -
            fn is_end_stream(&self) -> bool {
   83         -
                self.is_end_stream
   84         -
            }
   85         -
   86         -
            fn size_hint(&self) -> SizeHint {
   87         -
                // We can't return a hint because we don't know exactly how
   88         -
                // compression will affect the content length
   89         -
                SizeHint::default()
   90         -
            }
   91         -
        }
   92         -
   93         -
        impl CompressedBody<SdkBody, Box<dyn CompressRequest>> {
   94         -
            /// Consumes this `CompressedBody` and returns an [`SdkBody`] containing the compressed data.
   95         -
            ///
   96         -
            /// This *requires* that the inner `SdkBody` is in-memory (i.e. not streaming). Otherwise, an error is returned.
   97         -
            /// If compression fails, an error is returned.
   98         -
            pub fn into_compressed_sdk_body(mut self) -> Result<SdkBody, BoxError> {
   99         -
                let mut compressed_body = Vec::new();
  100         -
                let bytes = self.body.bytes().ok_or_else(|| "`into_compressed_sdk_body` requires that the inner body is 'in-memory', but it was streaming".to_string())?;
  101         -
  102         -
                self.compress_request
  103         -
                    .compress_bytes(bytes, &mut compressed_body)?;
  104         -
                Ok(SdkBody::from(compressed_body))
  105         -
            }
  106         -
        }
  107         -
    }
  108         -
  109     39   
    /// Support for the `http-body-1-0` and `http-1-0` crates.
  110         -
    #[cfg(feature = "http-body-1-x")]
  111     40   
    pub mod http_body_1_x {
  112     41   
        use crate::body::compress::CompressedBody;
  113         -
        use crate::http::http_body_1_x::CompressRequest;
          42  +
        use crate::http::CompressRequest;
          43  +
        use aws_smithy_runtime_api::box_error::BoxError;
  114     44   
        use aws_smithy_types::body::SdkBody;
  115         -
        use http_body_1_0::{Body, Frame, SizeHint};
          45  +
        use http_body_1x::{Body, Frame, SizeHint};
  116     46   
        use std::pin::Pin;
  117     47   
        use std::task::{ready, Context, Poll};
  118     48   
  119     49   
        impl Body for CompressedBody<SdkBody, Box<dyn CompressRequest>> {
  120     50   
            type Data = bytes::Bytes;
  121     51   
            type Error = aws_smithy_types::body::Error;
  122     52   
  123     53   
            fn poll_frame(
  124     54   
                mut self: Pin<&mut Self>,
  125     55   
                cx: &mut Context<'_>,
  126     56   
            ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
  127     57   
                let this = self.as_mut().project();
  128     58   
                Poll::Ready(match ready!(this.body.poll_frame(cx)) {
  129     59   
                    Some(Ok(f)) => {
  130     60   
                        if f.is_data() {
  131     61   
                            let d = f.into_data().expect("we checked for data first");
  132     62   
                            let mut out = Vec::new();
  133     63   
                            this.compress_request.compress_bytes(&d, &mut out)?;
  134     64   
                            Some(Ok(Frame::data(out.into())))
  135     65   
                        } else if f.is_trailers() {
  136     66   
                            // Trailers don't get compressed.
  137     67   
                            Some(Ok(f))
  138     68   
                        } else {
  139     69   
                            unreachable!("Frame is either data or trailers")
  140     70   
                        }
  141     71   
                    }
  142     72   
                    None => {
  143     73   
                        *this.is_end_stream = true;
  144     74   
                        None
  145     75   
                    }
  146     76   
                    other => other,
  147     77   
                })
  148     78   
            }
  149     79   
  150     80   
            fn is_end_stream(&self) -> bool {
  151     81   
                self.is_end_stream
  152     82   
            }
  153     83   
  154     84   
            fn size_hint(&self) -> SizeHint {
  155     85   
                // We can't return a hint because we don't know exactly how
  156     86   
                // compression will affect the content length
  157     87   
                SizeHint::default()
  158     88   
            }
  159     89   
        }
          90  +
        impl CompressedBody<SdkBody, Box<dyn CompressRequest>> {
          91  +
            /// Consumes this `CompressedBody` and returns an [`SdkBody`] containing the compressed data.
          92  +
            ///
          93  +
            /// This *requires* that the inner `SdkBody` is in-memory (i.e. not streaming). Otherwise, an error is returned.
          94  +
            /// If compression fails, an error is returned.
          95  +
            pub fn into_compressed_sdk_body(mut self) -> Result<SdkBody, BoxError> {
          96  +
                let mut compressed_body = Vec::new();
          97  +
                let bytes = self.body.bytes().ok_or_else(|| "`into_compressed_sdk_body` requires that the inner body is 'in-memory', but it was streaming".to_string())?;
          98  +
          99  +
                self.compress_request
         100  +
                    .compress_bytes(bytes, &mut compressed_body)?;
         101  +
                Ok(SdkBody::from(compressed_body))
         102  +
            }
         103  +
        }
  160    104   
    }
  161    105   
}
  162    106   
  163         -
#[cfg(any(feature = "http-body-0-4-x", feature = "http-body-1-x"))]
  164    107   
#[cfg(test)]
  165    108   
mod test {
  166    109   
    use crate::body::compress::CompressedBody;
  167    110   
    use crate::{CompressionAlgorithm, CompressionOptions};
  168    111   
    use aws_smithy_types::body::SdkBody;
  169    112   
    use bytes::Buf;
  170    113   
    use bytes_utils::SegmentedBuf;
  171    114   
    use std::io::Read;
  172    115   
    const UNCOMPRESSED_INPUT: &[u8] = b"hello world";
  173    116   
    const COMPRESSED_OUTPUT: &[u8] = &[
  174    117   
        31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 203, 72, 205, 201, 201, 87, 40, 207, 47, 202, 73, 1, 0,
  175    118   
        133, 17, 74, 13, 11, 0, 0, 0,
  176    119   
    ];
  177    120   
  178         -
    #[cfg(feature = "http-body-0-4-x")]
  179         -
    mod http_body_0_4_x {
  180         -
        use super::*;
  181         -
        use http_body_0_4::Body;
  182         -
  183         -
        #[tokio::test]
  184         -
        async fn test_body_is_compressed() {
  185         -
            let compression_options = CompressionOptions::default()
  186         -
                .with_min_compression_size_bytes(0)
  187         -
                .unwrap();
  188         -
            let compress_request =
  189         -
                CompressionAlgorithm::Gzip.into_impl_http_body_0_4_x(&compression_options);
  190         -
            let body = SdkBody::from(UNCOMPRESSED_INPUT);
  191         -
            let mut compressed_body = CompressedBody::new(body, compress_request);
  192         -
  193         -
            let mut output = SegmentedBuf::new();
  194         -
            while let Some(buf) = compressed_body.data().await {
  195         -
                output.push(buf.unwrap());
         121  +
    use http_body_util::BodyExt;
         122  +
         123  +
    #[tokio::test]
         124  +
    async fn test_body_is_compressed() {
         125  +
        let compression_options = CompressionOptions::default()
         126  +
            .with_min_compression_size_bytes(0)
         127  +
            .unwrap();
         128  +
        let compress_request =
         129  +
            CompressionAlgorithm::Gzip.into_impl_http_body_1_x(&compression_options);
         130  +
        let body = SdkBody::from(UNCOMPRESSED_INPUT);
         131  +
        let mut compressed_body = CompressedBody::new(body, compress_request);
         132  +
         133  +
        let mut output = SegmentedBuf::new();
         134  +
         135  +
        loop {
         136  +
            let data = match compressed_body.frame().await {
         137  +
                Some(Ok(frame)) => frame.into_data(),
         138  +
                Some(Err(e)) => panic!("Error: {}", e),
         139  +
                // No more frames, break out of loop
         140  +
                None => break,
  196    141   
            }
  197         -
  198         -
            let mut actual_output = Vec::new();
  199         -
            output
  200         -
                .reader()
  201         -
                .read_to_end(&mut actual_output)
  202         -
                .expect("Doesn't cause IO errors");
  203         -
            // Verify data is compressed as expected
  204         -
            assert_eq!(COMPRESSED_OUTPUT, actual_output);
  205         -
        }
  206         -
  207         -
        #[tokio::test]
  208         -
        async fn test_into_compressed_sdk_body() {
  209         -
            let compression_options = CompressionOptions::default()
  210         -
                .with_min_compression_size_bytes(0)
  211         -
                .unwrap();
  212         -
            let compress_request =
  213         -
                CompressionAlgorithm::Gzip.into_impl_http_body_0_4_x(&compression_options);
  214         -
            let body = SdkBody::from(UNCOMPRESSED_INPUT);
  215         -
            let compressed_sdk_body = CompressedBody::new(body, compress_request)
  216         -
                .into_compressed_sdk_body()
  217         -
                .unwrap();
  218         -
  219         -
            // Verify data is compressed as expected
  220         -
            assert_eq!(
  221         -
                COMPRESSED_OUTPUT,
  222         -
                compressed_sdk_body.bytes().expect("body is in-memory")
  223         -
            );
         142  +
            .expect("frame is OK");
         143  +
            output.push(data);
  224    144   
        }
  225         -
    }
  226         -
  227         -
    #[cfg(feature = "http-body-1-x")]
  228         -
    mod http_body_1_x {
  229         -
        use super::*;
  230         -
        use http_body_util::BodyExt;
  231         -
  232         -
        #[tokio::test]
  233         -
        async fn test_body_is_compressed() {
  234         -
            let compression_options = CompressionOptions::default()
  235         -
                .with_min_compression_size_bytes(0)
  236         -
                .unwrap();
  237         -
            let compress_request =
  238         -
                CompressionAlgorithm::Gzip.into_impl_http_body_1_x(&compression_options);
  239         -
            let body = SdkBody::from(UNCOMPRESSED_INPUT);
  240         -
            let mut compressed_body = CompressedBody::new(body, compress_request);
  241    145   
  242         -
            let mut output = SegmentedBuf::new();
  243         -
  244         -
            loop {
  245         -
                let data = match compressed_body.frame().await {
  246         -
                    Some(Ok(frame)) => frame.into_data(),
  247         -
                    Some(Err(e)) => panic!("Error: {}", e),
  248         -
                    // No more frames, break out of loop
  249         -
                    None => break,
  250         -
                }
  251         -
                .expect("frame is OK");
  252         -
                output.push(data);
  253         -
            }
  254         -
  255         -
            let mut actual_output = Vec::new();
  256         -
            output
  257         -
                .reader()
  258         -
                .read_to_end(&mut actual_output)
  259         -
                .expect("Doesn't cause IO errors");
  260         -
            // Verify data is compressed as expected
  261         -
            assert_eq!(COMPRESSED_OUTPUT, actual_output);
  262         -
        }
         146  +
        let mut actual_output = Vec::new();
         147  +
        output
         148  +
            .reader()
         149  +
            .read_to_end(&mut actual_output)
         150  +
            .expect("Doesn't cause IO errors");
         151  +
        // Verify data is compressed as expected
         152  +
        assert_eq!(COMPRESSED_OUTPUT, actual_output);
  263    153   
    }
  264    154   
}

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-compression/src/gzip.rs

@@ -1,1 +80,65 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
           6  +
use crate::http::CompressRequest;
    6      7   
use crate::{Compress, CompressionOptions};
    7      8   
use aws_smithy_runtime_api::box_error::BoxError;
    8      9   
use flate2::write::GzEncoder;
    9     10   
use std::io::prelude::*;
   10     11   
   11     12   
#[derive(Debug, Default, Clone, PartialEq, Eq)]
   12     13   
pub(crate) struct Gzip {
   13     14   
    compression: flate2::Compression,
   14     15   
}
   15     16   
   16     17   
impl Gzip {
   17     18   
    fn compress_bytes(&self, bytes: &[u8], writer: impl Write) -> Result<(), BoxError> {
   18     19   
        let mut encoder = GzEncoder::new(writer, self.compression);
   19     20   
        encoder.write_all(bytes)?;
   20     21   
        encoder.try_finish()?;
   21     22   
   22     23   
        Ok(())
   23     24   
    }
   24     25   
}
   25     26   
   26     27   
impl Compress for Gzip {
   27     28   
    fn compress_bytes(&mut self, bytes: &[u8], writer: &mut dyn Write) -> Result<(), BoxError> {
   28     29   
        Gzip::compress_bytes(self, bytes, writer)
   29     30   
    }
   30     31   
}
   31     32   
   32         -
#[cfg(feature = "http-body-0-4-x")]
   33         -
mod http_body_0_4_x {
   34         -
    use crate::http::http_body_0_4_x::CompressRequest;
   35         -
   36         -
    impl CompressRequest for super::Gzip {
   37         -
        fn header_value(&self) -> http_0_2::HeaderValue {
   38         -
            http_0_2::HeaderValue::from_static("gzip")
   39         -
        }
   40         -
    }
   41         -
}
   42         -
   43         -
#[cfg(feature = "http-body-1-x")]
   44         -
mod http_body_1_x {
   45         -
    use crate::http::http_body_1_x::CompressRequest;
   46         -
   47         -
    impl CompressRequest for super::Gzip {
   48         -
        fn header_value(&self) -> http_1_0::HeaderValue {
   49         -
            http_1_0::HeaderValue::from_static("gzip")
   50         -
        }
          33  +
impl CompressRequest for Gzip {
          34  +
    fn header_value(&self) -> http_1x::HeaderValue {
          35  +
        http_1x::HeaderValue::from_static("gzip")
   51     36   
    }
   52     37   
}
   53     38   
   54     39   
impl From<&CompressionOptions> for Gzip {
   55     40   
    fn from(options: &CompressionOptions) -> Self {
   56     41   
        Gzip {
   57     42   
            compression: flate2::Compression::new(options.level),
   58     43   
        }
   59     44   
    }
   60     45   
}

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-compression/src/http.rs

@@ -1,1 +84,42 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
    6      6   
//! Checksum support for HTTP requests and responses.
    7      7   
    8         -
/// Support for the `http-body-0-4` and `http-0-2` crates.
    9         -
#[cfg(feature = "http-body-0-4-x")]
   10         -
pub mod http_body_0_4_x {
   11         -
    use crate::Compress;
   12         -
    use http_0_2::header::{HeaderName, HeaderValue};
   13         -
   14         -
    /// Implementors of this trait can be used to compress HTTP requests.
   15         -
    pub trait CompressRequest: Compress + CloneCompressRequest {
   16         -
        /// Return the header name for the content-encoding header.
   17         -
        fn header_name(&self) -> HeaderName {
   18         -
            HeaderName::from_static("content-encoding")
   19         -
        }
   20         -
   21         -
        /// Return the header value for the content-encoding header.
   22         -
        fn header_value(&self) -> HeaderValue;
   23         -
    }
   24         -
   25         -
    /// Enables CompressRequest implementors to be cloned.
   26         -
    pub trait CloneCompressRequest {
   27         -
        /// Clone this request compressor.
   28         -
        fn clone_request_compressor(&self) -> Box<dyn CompressRequest>;
   29         -
    }
           8  +
/// Support for the `http-body-1-0` and `http-1-0` crates.
           9  +
use crate::Compress;
          10  +
use http_1x::header::{HeaderName, HeaderValue};
   30     11   
   31         -
    impl<T> CloneCompressRequest for T
   32         -
    where
   33         -
        T: CompressRequest + Clone + 'static,
   34         -
    {
   35         -
        fn clone_request_compressor(&self) -> Box<dyn CompressRequest> {
   36         -
            Box::new(self.clone())
   37         -
        }
          12  +
/// Implementors of this trait can be used to compress HTTP requests.
          13  +
pub trait CompressRequest: Compress + CloneCompressRequest {
          14  +
    /// Return the header name for the content-encoding header.
          15  +
    fn header_name(&self) -> HeaderName {
          16  +
        HeaderName::from_static("content-encoding")
   38     17   
    }
   39     18   
   40         -
    impl Clone for Box<dyn CompressRequest> {
   41         -
        fn clone(&self) -> Self {
   42         -
            self.clone_request_compressor()
   43         -
        }
   44         -
    }
          19  +
    /// Return the header value for the content-encoding header.
          20  +
    fn header_value(&self) -> HeaderValue;
   45     21   
}
   46     22   
   47         -
/// Support for the `http-body-1-0` and `http-1-0` crates.
   48         -
#[cfg(feature = "http-body-1-x")]
   49         -
pub mod http_body_1_x {
   50         -
    use crate::Compress;
   51         -
    use http_1_0::header::{HeaderName, HeaderValue};
   52         -
   53         -
    /// Implementors of this trait can be used to compress HTTP requests.
   54         -
    pub trait CompressRequest: Compress + CloneCompressRequest {
   55         -
        /// Return the header name for the content-encoding header.
   56         -
        fn header_name(&self) -> HeaderName {
   57         -
            HeaderName::from_static("content-encoding")
   58         -
        }
   59         -
   60         -
        /// Return the header value for the content-encoding header.
   61         -
        fn header_value(&self) -> HeaderValue;
   62         -
    }
   63         -
   64         -
    /// Enables CompressRequest implementors to be cloned.
   65         -
    pub trait CloneCompressRequest {
   66         -
        /// Clone this request compressor.
   67         -
        fn clone_request_compressor(&self) -> Box<dyn CompressRequest>;
   68         -
    }
          23  +
/// Enables CompressRequest implementors to be cloned.
          24  +
pub trait CloneCompressRequest {
          25  +
    /// Clone this request compressor.
          26  +
    fn clone_request_compressor(&self) -> Box<dyn CompressRequest>;
          27  +
}
   69     28   
   70         -
    impl<T> CloneCompressRequest for T
   71         -
    where
   72         -
        T: CompressRequest + Clone + 'static,
   73         -
    {
   74         -
        fn clone_request_compressor(&self) -> Box<dyn CompressRequest> {
   75         -
            Box::new(self.clone())
   76         -
        }
          29  +
impl<T> CloneCompressRequest for T
          30  +
where
          31  +
    T: CompressRequest + Clone + 'static,
          32  +
{
          33  +
    fn clone_request_compressor(&self) -> Box<dyn CompressRequest> {
          34  +
        Box::new(self.clone())
   77     35   
    }
          36  +
}
   78     37   
   79         -
    impl Clone for Box<dyn CompressRequest> {
   80         -
        fn clone(&self) -> Self {
   81         -
            self.clone_request_compressor()
   82         -
        }
          38  +
impl Clone for Box<dyn CompressRequest> {
          39  +
    fn clone(&self) -> Self {
          40  +
        self.clone_request_compressor()
   83     41   
    }
   84     42   
}

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-compression/src/lib.rs

@@ -136,136 +212,200 @@
  156    156   
    fn from_str(compression_algorithm: &str) -> Result<Self, Self::Err> {
  157    157   
        if compression_algorithm.eq_ignore_ascii_case(GZIP_NAME) {
  158    158   
            Ok(Self::Gzip)
  159    159   
        } else {
  160    160   
            Err(format!("unknown compression algorithm `{compression_algorithm}`").into())
  161    161   
        }
  162    162   
    }
  163    163   
}
  164    164   
  165    165   
impl CompressionAlgorithm {
  166         -
    #[cfg(feature = "http-body-0-4-x")]
  167         -
    /// Return the `HttpChecksum` implementor for this algorithm.
  168         -
    pub fn into_impl_http_body_0_4_x(
  169         -
        self,
  170         -
        options: &CompressionOptions,
  171         -
    ) -> Box<dyn http::http_body_0_4_x::CompressRequest> {
  172         -
        match self {
  173         -
            Self::Gzip => Box::new(gzip::Gzip::from(options)),
  174         -
        }
  175         -
    }
  176         -
  177         -
    #[cfg(feature = "http-body-1-x")]
  178    166   
    /// Return the `HttpChecksum` implementor for this algorithm.
  179    167   
    pub fn into_impl_http_body_1_x(
  180    168   
        self,
  181    169   
        options: &CompressionOptions,
  182         -
    ) -> Box<dyn http::http_body_1_x::CompressRequest> {
         170  +
    ) -> Box<dyn http::CompressRequest> {
  183    171   
        match self {
  184    172   
            Self::Gzip => Box::new(gzip::Gzip::from(options)),
  185    173   
        }
  186    174   
    }
  187    175   
  188    176   
    /// Return the name of this algorithm in string form
  189    177   
    pub fn as_str(&self) -> &'static str {
  190    178   
        match self {
  191    179   
            Self::Gzip { .. } => GZIP_NAME,
  192    180   
        }

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-dns/Cargo.toml

@@ -1,1 +33,33 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-dns"
    4         -
version = "0.1.5"
           4  +
version = "0.1.6"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>"]
    6      6   
description = "DNS resolvers for smithy-rs"
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/awslabs/smithy-rs"
   10     10   
rust-version = "1.88"
   11     11   
[package.metadata.docs.rs]
   12     12   
all-features = true
   13     13   
targets = ["x86_64-unknown-linux-gnu"]
   14     14   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   15     15   
rustdoc-args = ["--cfg", "docsrs"]
   16     16   
   17     17   
[features]
   18     18   
hickory-dns = ["dep:hickory-resolver", "dep:tokio", "tokio/rt"]
   19     19   
[dependencies.aws-smithy-runtime-api]
   20     20   
path = "../aws-smithy-runtime-api"
   21     21   
features = ["client"]
   22         -
version = "1.10.0"
          22  +
version = "1.11.0"
   23     23   
   24     24   
[dependencies.tokio]
   25         -
version = "1.40.0"
          25  +
version = "1.46.0"
   26     26   
features = []
   27     27   
optional = true
   28     28   
[target."cfg(not(target_family = \"wasm\"))".dependencies.hickory-resolver]
   29     29   
version = "0.25.2"
   30     30   
optional = true
   31     31   
   32     32   
[dev-dependencies]
   33     33   
criterion = "0.5.1"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-eventstream/Cargo.toml

@@ -1,1 +53,54 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[[bench]]
    3      3   
name = "write_message_performance"
    4      4   
harness = false
    5      5   
    6      6   
[package]
    7      7   
name = "aws-smithy-eventstream"
    8         -
version = "0.60.14"
           8  +
version = "0.60.15"
    9      9   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "John DiSanti <jdisanti@amazon.com>"]
   10     10   
description = "Event stream logic for smithy-rs."
   11     11   
edition = "2021"
   12     12   
license = "Apache-2.0"
   13     13   
repository = "https://github.com/smithy-lang/smithy-rs"
   14     14   
rust-version = "1.88"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   19     19   
rustdoc-args = ["--cfg", "docsrs"]
   20     20   
   21     21   
[features]
   22     22   
derive-arbitrary = ["dep:arbitrary", "dep:derive_arbitrary", "arbitrary?/derive"]
   23     23   
test-util = []
   24     24   
__bench-jemalloc = []
   25     25   
__bench-mimalloc = []
   26     26   
   27     27   
[dependencies]
   28     28   
bytes = "1.10.0"
   29     29   
crc32fast = "1.3"
   30     30   
   31     31   
[dependencies.arbitrary]
   32     32   
version = "1.3"
   33     33   
optional = true
   34     34   
   35     35   
[dependencies.aws-smithy-types]
   36     36   
path = "../aws-smithy-types"
   37         -
version = "1.3.6"
          37  +
features = ["http-body-1-x"]
          38  +
version = "1.4.0"
   38     39   
   39     40   
[dependencies.derive_arbitrary]
   40     41   
version = "1.3"
   41     42   
optional = true
   42     43   
   43     44   
[dev-dependencies]
   44     45   
bytes-utils = "0.1"
   45     46   
   46     47   
[dev-dependencies.criterion]
   47     48   
version = "0.5"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-eventstream/fuzz/Cargo.toml

@@ -21,21 +59,59 @@
   41     41   
   42     42   
[dependencies]
   43     43   
arbitrary = "1.3"
   44     44   
bytes = "1"
   45     45   
crc32fast = "1"
   46     46   
derive_arbitrary = "1.3"
   47     47   
libfuzzer-sys = "=0.4.7"
   48     48   
   49     49   
[dependencies.aws-smithy-types]
   50     50   
path = "../../aws-smithy-types"
   51         -
version = "1.3.6"
          51  +
version = "1.4.0"
   52     52   
   53     53   
[dependencies.aws-smithy-eventstream]
   54     54   
features = ["derive-arbitrary"]
   55     55   
path = ".."
   56         -
version = "0.60.14"
          56  +
version = "0.60.15"
   57     57   
   58     58   
[workspace]
   59     59   
members = ["."]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http-client/Cargo.toml

@@ -1,1 +234,234 @@
   16     16   
   17     17   
[[example]]
   18     18   
name = "custom-dns"
   19     19   
required-features = ["rustls-ring"]
   20     20   
doc-scrape-examples = true
   21     21   
   22     22   
[package]
   23     23   
name = "aws-smithy-http-client"
   24     24   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>"]
   25     25   
description = "HTTP client abstractions for generated smithy clients"
   26         -
version = "1.1.5"
          26  +
version = "1.1.6"
   27     27   
license = "Apache-2.0"
   28     28   
edition = "2021"
   29     29   
repository = "https://github.com/smithy-lang/smithy-rs"
   30     30   
rust-version = "1.88"
   31     31   
[package.metadata.smithy-rs-release-tooling]
   32     32   
stable = true
   33     33   
[package.metadata.docs.rs]
   34     34   
all-features = false
   35     35   
features = ["default-client ", "wire-mock", "test-util", "rustls-ring", "rustls-aws-lc"]
   36     36   
targets = ["x86_64-unknown-linux-gnu"]
   37     37   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   38     38   
rustdoc-args = ["--cfg", "docsrs"]
   39     39   
   40     40   
[features]
   41     41   
hyper-014 = ["aws-smithy-runtime-api/http-02x", "aws-smithy-types/http-body-0-4-x", "dep:http-02x", "dep:http-body-04x", "dep:hyper-0-14", "dep:h2-0-3"]
   42     42   
default-client = ["aws-smithy-runtime-api/http-1x", "aws-smithy-types/http-body-1-x", "dep:hyper", "dep:hyper-util", "hyper-util?/client-legacy", "hyper-util?/client-proxy", "dep:http-1x", "dep:tower", "dep:rustls-pki-types", "dep:rustls-native-certs"]
   43     43   
wire-mock = ["test-util", "default-client", "hyper-util?/server", "hyper-util?/server-auto", "hyper-util?/service", "hyper-util?/server-graceful", "tokio/macros", "dep:http-body-util"]
   44     44   
test-util = ["dep:aws-smithy-protocol-test", "dep:serde", "dep:serde_json", "dep:indexmap", "dep:bytes", "dep:http-1x", "aws-smithy-runtime-api/http-1x", "dep:http-body-1x", "aws-smithy-types/http-body-1-x", "tokio/rt"]
   45     45   
legacy-test-util = ["test-util", "dep:http-02x", "aws-smithy-runtime-api/http-02x", "aws-smithy-types/http-body-0-4-x"]
   46     46   
legacy-rustls-ring = ["dep:legacy-hyper-rustls", "dep:legacy-rustls", "dep:rustls-native-certs", "hyper-014"]
   47     47   
rustls-ring = ["dep:rustls", "rustls?/ring", "dep:hyper-rustls", "dep:tokio-rustls", "default-client"]
   48     48   
rustls-aws-lc = ["dep:rustls", "rustls?/aws_lc_rs", "rustls?/prefer-post-quantum", "dep:hyper-rustls", "dep:tokio-rustls", "default-client"]
   49     49   
rustls-aws-lc-fips = ["dep:rustls", "rustls?/fips", "rustls?/prefer-post-quantum", "dep:hyper-rustls", "dep:tokio-rustls", "default-client"]
   50     50   
s2n-tls = ["dep:s2n-tls", "dep:s2n-tls-hyper", "dep:s2n-tls-tokio", "default-client"]
   51     51   
   52     52   
[dependencies]
   53     53   
pin-project-lite = "0.2.14"
   54     54   
tracing = "0.1.40"
   55     55   
   56     56   
[dependencies.aws-smithy-async]
   57     57   
path = "../aws-smithy-async"
   58         -
version = "1.2.7"
          58  +
version = "1.2.8"
   59     59   
   60     60   
[dependencies.aws-smithy-runtime-api]
   61     61   
path = "../aws-smithy-runtime-api"
   62     62   
features = ["client"]
   63         -
version = "1.10.0"
          63  +
version = "1.11.0"
   64     64   
   65     65   
[dependencies.aws-smithy-types]
   66     66   
path = "../aws-smithy-types"
   67         -
version = "1.3.6"
          67  +
version = "1.4.0"
   68     68   
   69     69   
[dependencies.aws-smithy-protocol-test]
   70     70   
path = "../aws-smithy-protocol-test"
   71     71   
optional = true
   72         -
version = "0.63.7"
          72  +
version = "0.63.8"
   73     73   
   74     74   
[dependencies.h2]
   75     75   
version = "0.4.11"
   76     76   
default-features = false
   77     77   
   78     78   
[dependencies.tokio]
   79         -
version = "1.40"
          79  +
version = "1.46"
   80     80   
features = []
   81     81   
   82     82   
[dependencies.hyper]
   83     83   
version = "1.6.0"
   84     84   
features = ["client", "http1", "http2"]
   85     85   
optional = true
   86     86   
   87     87   
[dependencies.hyper-util]
   88     88   
version = "0.1.16"
   89     89   
features = ["http1", "http2"]
   90     90   
optional = true
   91     91   
   92     92   
[dependencies.http-1x]
   93     93   
package = "http"
   94         -
version = "1"
          94  +
version = "1.3.1"
   95     95   
optional = true
   96     96   
   97     97   
[dependencies.http-body-1x]
   98     98   
package = "http-body"
   99         -
version = "1"
          99  +
version = "1.0.1"
  100    100   
optional = true
  101    101   
  102    102   
[dependencies.hyper-rustls]
  103    103   
version = "0.27"
  104    104   
features = ["http2", "http1", "native-tokio", "tls12"]
  105    105   
default-features = false
  106    106   
optional = true
  107    107   
  108    108   
[dependencies.rustls]
  109    109   
version = "0.23.31"
  110    110   
default-features = false
  111    111   
optional = true
  112    112   
  113    113   
[dependencies.tokio-rustls]
  114    114   
version = "0.26.2"
  115    115   
default-features = false
  116    116   
optional = true
  117    117   
  118    118   
[dependencies.s2n-tls-hyper]
  119    119   
version = "0.0.16"
  120    120   
optional = true
  121    121   
  122    122   
[dependencies.s2n-tls]
  123    123   
version = "0.3.24"
  124    124   
optional = true
  125    125   
  126    126   
[dependencies.s2n-tls-tokio]
  127    127   
version = "0.3.24"
  128    128   
optional = true
  129    129   
  130    130   
[dependencies.tower]
  131    131   
version = "0.5.2"
  132    132   
optional = true
  133    133   
  134    134   
[dependencies.rustls-pki-types]
  135    135   
version = "1.12.0"
  136    136   
features = ["std"]
  137    137   
optional = true
  138    138   
  139    139   
[dependencies.rustls-native-certs]
  140    140   
version = "0.8.1"
  141    141   
optional = true
  142    142   
  143    143   
[dependencies.http-02x]
  144    144   
package = "http"
  145         -
version = "0.2.9"
         145  +
version = "0.2.12"
  146    146   
optional = true
  147    147   
  148    148   
[dependencies.http-body-04x]
  149    149   
package = "http-body"
  150         -
version = "0.4.5"
         150  +
version = "0.4.6"
  151    151   
optional = true
  152    152   
  153    153   
[dependencies.hyper-0-14]
  154    154   
package = "hyper"
  155    155   
version = "0.14.26"
  156    156   
default-features = false
  157    157   
features = ["client", "http1", "http2", "tcp", "stream"]
  158    158   
optional = true
  159    159   
  160    160   
[dependencies.legacy-hyper-rustls]
  161    161   
package = "hyper-rustls"
  162    162   
version = "0.24.2"
  163    163   
default-features = false
  164    164   
features = ["http1", "tls12", "logging", "acceptor", "tokio-runtime", "http2"]
  165    165   
optional = true
  166    166   
  167    167   
[dependencies.legacy-rustls]
  168    168   
package = "rustls"
  169    169   
version = "0.21.8"
  170    170   
optional = true
  171    171   
  172    172   
[dependencies.h2-0-3]
  173    173   
package = "h2"
  174    174   
version = "0.3.24"
  175    175   
optional = true
  176    176   
  177    177   
[dependencies.bytes]
  178    178   
version = "1.10.0"
  179    179   
optional = true
  180    180   
  181    181   
[dependencies.serde]
  182    182   
version = "1.0.210"
  183    183   
features = ["derive"]
  184    184   
optional = true
  185    185   
  186    186   
[dependencies.serde_json]
  187    187   
version = "1.0.128"
  188    188   
features = ["preserve_order"]
  189    189   
optional = true
  190    190   
  191    191   
[dependencies.indexmap]
  192    192   
version = "2.10.0"
  193    193   
features = ["serde"]
  194    194   
optional = true
  195    195   
  196    196   
[dependencies.http-body-util]
  197         -
version = "0.1.2"
         197  +
version = "0.1.3"
  198    198   
optional = true
  199    199   
  200    200   
[dev-dependencies]
  201    201   
serial_test = "3.2"
  202    202   
base64 = "0.22"
  203    203   
rustls-pemfile = "2.2.0"
  204    204   
tokio-rustls = "0.26.2"
  205    205   
  206    206   
[dev-dependencies.aws-smithy-async]
  207    207   
path = "../aws-smithy-async"
  208    208   
features = ["rt-tokio", "test-util"]
  209         -
version = "1.2.7"
         209  +
version = "1.2.8"
  210    210   
  211    211   
[dev-dependencies.aws-smithy-runtime-api]
  212    212   
path = "../aws-smithy-runtime-api"
  213    213   
features = ["test-util"]
  214         -
version = "1.10.0"
         214  +
version = "1.11.0"
  215    215   
  216    216   
[dev-dependencies.aws-smithy-types]
  217    217   
path = "../aws-smithy-types"
  218    218   
features = ["http-body-0-4-x", "test-util"]
  219         -
version = "1.3.6"
         219  +
version = "1.4.0"
  220    220   
  221    221   
[dev-dependencies.http-body-util]
  222         -
version = "0.1.2"
         222  +
version = "0.1.3"
  223    223   
  224    224   
[dev-dependencies.hyper-util]
  225    225   
version = "0.1.16"
  226    226   
features = ["full"]
  227    227   
  228    228   
[dev-dependencies.rustls-pki-types]
  229    229   
version = "1.12.0"
  230    230   
features = ["std"]
  231    231   
  232    232   
[dev-dependencies.tokio]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http/Cargo.toml

@@ -1,1 +75,71 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-http"
    4         -
version = "0.62.6"
           4  +
version = "0.63.0"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "Smithy HTTP logic for smithy-rs."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
rust-version = "1.88"
   11     11   
[package.metadata.docs.rs]
   12     12   
all-features = true
   13     13   
targets = ["x86_64-unknown-linux-gnu"]
   14     14   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   15     15   
rustdoc-args = ["--cfg", "docsrs"]
   16     16   
   17     17   
[features]
   18     18   
event-stream = ["aws-smithy-eventstream"]
   19     19   
rt-tokio = ["aws-smithy-types/rt-tokio"]
   20     20   
   21     21   
[dependencies]
   22     22   
bytes = "1.10.0"
   23     23   
bytes-utils = "0.1"
          24  +
http-body-util = "0.1.3"
   24     25   
percent-encoding = "2.3.1"
   25     26   
pin-project-lite = "0.2.14"
   26     27   
pin-utils = "0.1.0"
   27     28   
tracing = "0.1.40"
   28     29   
futures-core = "0.3.31"
   29     30   
   30     31   
[dependencies.aws-smithy-eventstream]
   31     32   
path = "../aws-smithy-eventstream"
   32     33   
optional = true
   33         -
version = "0.60.14"
          34  +
version = "0.60.15"
   34     35   
   35     36   
[dependencies.aws-smithy-runtime-api]
   36     37   
path = "../aws-smithy-runtime-api"
   37         -
features = ["client", "http-02x"]
   38         -
version = "1.10.0"
          38  +
features = ["client", "http-1x"]
          39  +
version = "1.11.0"
   39     40   
   40     41   
[dependencies.aws-smithy-types]
   41     42   
path = "../aws-smithy-types"
   42         -
features = ["byte-stream-poll-next", "http-body-0-4-x"]
   43         -
version = "1.3.6"
   44         -
   45         -
[dependencies.http-02x]
   46         -
package = "http"
   47         -
version = "0.2.9"
          43  +
features = ["byte-stream-poll-next", "http-body-1-x"]
          44  +
version = "1.4.0"
   48     45   
   49     46   
[dependencies.http-1x]
   50     47   
package = "http"
   51         -
version = "1"
          48  +
version = "1.3.1"
   52     49   
   53         -
[dependencies.http-body-04x]
          50  +
[dependencies.http-body-1x]
   54     51   
package = "http-body"
   55         -
version = "0.4.5"
          52  +
version = "1.0.1"
   56     53   
   57     54   
[dependencies.futures-util]
   58     55   
version = "0.3.29"
   59     56   
default-features = false
   60     57   
   61     58   
[dev-dependencies]
   62     59   
async-stream = "0.3"
   63     60   
proptest = "1"
   64     61   
   65     62   
[dev-dependencies.futures-util]
   66     63   
version = "0.3.29"
   67     64   
default-features = false
   68     65   
   69     66   
[dev-dependencies.hyper]
   70         -
version = "0.14.26"
   71         -
features = ["stream"]
          67  +
version = "1"
   72     68   
   73     69   
[dev-dependencies.tokio]
   74     70   
version = "1.23.1"
   75     71   
features = ["macros", "rt", "rt-multi-thread"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http/fuzz/Cargo.toml

@@ -1,1 +27,27 @@
   14     14   
   15     15   
[package.metadata]
   16     16   
cargo-fuzz = true
   17     17   
   18     18   
[dependencies]
   19     19   
libfuzzer-sys = "=0.4.7"
   20     20   
http = "0.2.3"
   21     21   
   22     22   
[dependencies.aws-smithy-http]
   23     23   
path = ".."
   24         -
version = "0.62.6"
          24  +
version = "0.63.0"
   25     25   
   26     26   
[workspace]
   27     27   
members = ["."]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http/proptest-regressions/event_stream/receiver.txt

@@ -0,1 +0,7 @@
           1  +
# Seeds for failure cases proptest has generated in the past. It is
           2  +
# automatically read and these particular cases re-run before any
           3  +
# novel cases are generated.
           4  +
#
           5  +
# It is recommended to check this file in to source control so that
           6  +
# everyone who runs the test benefits from these saved cases.
           7  +
cc 037f145ed8bf49e5fd7dcb7d631fb5f3901746135dc93d929a6fb6bb6e7f5d02 # shrinks to b1 = 0, b2 = 0