Skip to content

Commit

Permalink
Undeprecate {content_type,accept}_header_classifier from `aws-smith…
Browse files Browse the repository at this point in the history
…y-http-server` (#2604)

These functions were mistakenly deprecated when deprecating the old
service builder API in #1886.

However, they're fine, and they're internally used by the generated
server SDKs.
The module they reside in is `#[doc(hidden)]`.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
david-perez authored and rcoh committed Apr 24, 2023
1 parent 80afac6 commit 6bcd676
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rust-runtime/aws-smithy-http-server/src/protocols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn parse_content_type(headers: &HeaderMap) -> Result<mime::Mime, MissingContentT
}

/// Checks that the `content-type` header is valid.
#[allow(deprecated, clippy::result_large_err)]
#[allow(clippy::result_large_err)]
pub fn content_type_header_classifier(
headers: &HeaderMap,
expected_content_type: Option<&'static str>,
Expand Down Expand Up @@ -66,7 +66,6 @@ pub fn content_type_header_classifier(
Ok(())
}

#[allow(deprecated)]
pub fn accept_header_classifier(headers: &HeaderMap, content_type: &'static str) -> bool {
if !headers.contains_key(http::header::ACCEPT) {
return true;
Expand Down Expand Up @@ -105,7 +104,6 @@ pub fn accept_header_classifier(headers: &HeaderMap, content_type: &'static str)
})
}

#[allow(deprecated)]
#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 6bcd676

Please sign in to comment.