Conversation
AWS Bedrock responses use application/x-amz-json-1.0 and 1.1. Treat those exact subtypes as text so response inspection does not produce binary-body warnings. Keep isJson() unchanged and do not classify unknown versions as text.
Contributor
|
LGTM |
Iterate over the supported MIME test inputs by const reference to satisfy the range-copy lint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
application/x-amz-json-1.0andapplication/x-amz-json-1.1as text.MimeType::isJson()unchanged and leave unknown AWS JSON versions non-text.1.2boundary.AWS Bedrock returns the supported media types for JSON responses. Treating them as text prevents binary-body warnings when tooling inspects those responses without broadening JSON parsing behavior.
Testing
//src/workerd/util:mimetype-test@with--runs_per_test=5//src/workerd/util:mimetype-test@with--config=clang-tidy