-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Explicity write http headers on streaming endpoints #47796
Conversation
Added an |
f30c263
to
b19aca4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think @krissetto also wanted to have a look
This works around issues with the otel http handler wrapper causing multiple calls to `WriteHeader` when a `Flush` is called before `Write`. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
b19aca4
to
707ab48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its fine to move it to internal, however I'm not sure about the updated implementation. |
I'd have to get rid of the changes made to workaround this superfluous writeheader issue, but the rest of the implementation has been left as-is (with one exception, the removal of a func that had a comment saying it really shouldn't be used) |
superfluous response.WriteHeader call
#47715This works around issues with the otel http handler wrapper causing multiple calls to
WriteHeader
when aFlush
is called beforeWrite
.closes #47448