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

feat: flush writes to http response on every chunk #743

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ This changelog keeps track of work items that have been completed and are ready

### Fixes

- **Interceptor**: fatal error: concurrent map iteration and map write ([#726](https://github.com/kedacore/http-add-on/issues/726))
- **Interceptor**: Add support for streaming responses ([#743](https://github.com/kedacore/http-add-on/issues/743))
- **Interceptor**: Fatal error: concurrent map iteration and map write ([#726](https://github.com/kedacore/http-add-on/issues/726))
- **Interceptor**: Keep original Host in the Host header ([#331](https://github.com/kedacore/http-add-on/issues/331))
- **Interceptor**: Provide graceful shutdown for http servers on SIGINT and SIGTERM ([#731](https://github.com/kedacore/http-add-on/issues/731))
- **Operator**: Remove ScaledObject `name` & `app` custom labels ([#717](https://github.com/kedacore/http-add-on/issues/717))
Expand Down
3 changes: 3 additions & 0 deletions interceptor/middleware/loggingresponsewriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func (lrw *loggingResponseWriter) Header() http.Header {

func (lrw *loggingResponseWriter) Write(bytes []byte) (int, error) {
n, err := lrw.downstreamResponseWriter.Write(bytes)
if f, ok := lrw.downstreamResponseWriter.(http.Flusher); ok {
f.Flush()
}

lrw.bytesWritten += n

Expand Down
Loading