Make `Content-Type` check in `ServerHttpBoundProtocolGenerator` protocol-agnostic (#1605)
The `Content-Type` check of the incoming request in `ServerHttpBoundProtocolGenerator` is performed by comparing against the configured protocol directly within the class. Delegating to the protocol enables the implementation of protocols in decorators loaded from the classpath in other projects outside smithy-rs. This commit makes the `ServerHttpBoundProtocolGenerator` protocol-agnostic by looking up the expected incoming request `Content-Type` header from the protocol implementation directly. To this end, the macro-generated `check_<protocol>_content_type` functions from the `aws-smithy-http-server` runtime have been replaced with a single general `check_content_type` function that takes in the expected mime type.
Loading
Please register or sign in to comment