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

Backport 1.9.x: Fixing ResponseWriter to assert to http.Flusher in /sys/monitor endpoint (#13200) #13260

Merged
merged 5 commits into from
Nov 24, 2021

Conversation

hghaf099
Copy link
Contributor

@hghaf099 hghaf099 commented Nov 23, 2021

There are a number of interfaces that implement http.ResponseWriter. For that, wrapping http.ResponseWriter needs a lot of care.
StatusHeaderResponseWriter is instantiated in the http layer which wraps http.ResponseWriter. Then, HTTPResponseWriter wraps the already wrapped ResponseWriter. This causes issues as for example in the sys/monitor, the http.Flusher cannot be asserted and calling the endpoint returns stream not supported

* Unify NewHTTPResponseWriter ant NewStatusHeaderResponseWriter to fix ResponseWriter issues

* adding changelog

* removing unnecessary function from the WrappingResponseWriter interface

* changing logical requests responseWriter type

* reverting change to HTTPResponseWriter
@hghaf099 hghaf099 changed the title Backport 1.9.x: Unify HTTPResponseWriter and StatusHeaderResponseWriter (#13200) Backport 1.9.x: Fixing ResponseWriter to assert to http.Flusher in /sys/monitor endpoint (#13200) Nov 23, 2021
changelog/13200.txt Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault November 23, 2021 20:51 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook November 23, 2021 20:51 Inactive
@hghaf099 hghaf099 requested a review from ncabatoff November 23, 2021 20:51
@ncabatoff ncabatoff added this to the 1.9.1 milestone Nov 23, 2021
changelog/13200.txt Outdated Show resolved Hide resolved
changelog/13200.txt Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault November 24, 2021 15:01 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook November 24, 2021 15:01 Inactive
@hghaf099 hghaf099 requested a review from ncabatoff November 24, 2021 18:38
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.

2 participants