[Core] - Content header writer refactor ,add content header test, and remove mediaTypeWriters#1868
Draft
yisraelU wants to merge 5 commits intodisneystreaming:series/0.18from
Draft
[Core] - Content header writer refactor ,add content header test, and remove mediaTypeWriters#1868yisraelU wants to merge 5 commits intodisneystreaming:series/0.18from
yisraelU wants to merge 5 commits intodisneystreaming:series/0.18from
Conversation
lewisjkl
reviewed
Jan 9, 2026
Contributor
lewisjkl
left a comment
There was a problem hiding this comment.
I think this looks good, just clarifying question on the one test
Comment on lines
84
to
85
| // Note: The builder chain doesn't properly override requestMediaType, so it uses the default "text/plain" | ||
| // In production (http4s), the codec is configured directly with the desired requestMediaType |
Contributor
There was a problem hiding this comment.
Not sure I understand what is meant by this, can you elaborate?
Contributor
Author
There was a problem hiding this comment.
My apologies , this is leftover comments from a completely different attempt at solving the underlying issue
Contributor
Author
|
setting back to draft as I need to clarify some additional points |
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.
This PR changes how the content-type header is added to an outbound request in the Client codecs.
Currently , the mediaTypeWriters is invoked only when the MetadataEncoders are set .
The default for the UnaryClientCodecs is to have the Metadata Encoders set to None . ( I assume this is because some protocols dont have metadata ) . I observed when creating a test for the Content-Type header , if I did not set the metadata encoder a content type header would not be added . This is a hidden dependency and is incorrect behavior . The source for this logic is here , where if the metadata encoders field is
None, we just return the mediaTypeWriters , which does not know how to decompose a schema and partition out the body partThe logic for setting content-type header is ,
PR Checklist (not all items are relevant to all PRs)