Code-generate const
Mime
values for each expected Content-Type
in a request
#3703
Labels
const
Mime
values for each expected Content-Type
in a request
#3703
Currently, we re-parse expected request
Content-Type
header values intomime::Mime
s every time we service a request. It'd be more efficient ifaws_smithy_http_server::protocol::content_type_header_classifier_smithy
took in directly aconst
Mime
type.Note that we already do this to check the
Accept
header (against theContent-Type
of the response):smithy-rs/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt
Lines 243 to 261 in e912cf5
It's probably better if we decide on #2666 before tackling this issue, to avoid throwaway work.
Originally source of this issue is #3690 (comment).
The text was updated successfully, but these errors were encountered: