Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write Content-Length header if doForwardTrailers is not set #4259

Merged
merged 2 commits into from Apr 26, 2024

Conversation

joshgarnett
Copy link
Contributor

This PR Fixes #4238

@@ -176,6 +177,10 @@ func ForwardResponseMessage(ctx context.Context, mux *ServeMux, marshaler Marsha
return
}

if !doForwardTrailers {
w.Header().Set("Content-Length", strconv.Itoa(len(buf)))
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @johanbrandhorst, I've pushed a change that updates the existing tests to check for the header

…estOutgoingTrailerMatcher now checks that the headers match
@johanbrandhorst johanbrandhorst merged commit 4afdabd into grpc-ecosystem:main Apr 26, 2024
17 checks passed
@johanbrandhorst
Copy link
Collaborator

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content-Length not set in ForwardResponseMessage
2 participants