From 2bf3ba1f74d8fd12d8a9b15b96fd3cf01aa8d7d9 Mon Sep 17 00:00:00 2001 From: Itay Ariel Date: Mon, 24 Jul 2023 17:40:41 +0300 Subject: [PATCH 1/4] feat: flush writes to http response on every chunk Signed-off-by: Itay Ariel Signed-off-by: Jorge Turrado --- interceptor/middleware/loggingresponsewriter.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interceptor/middleware/loggingresponsewriter.go b/interceptor/middleware/loggingresponsewriter.go index 0ebb9c6c..9c893f1c 100644 --- a/interceptor/middleware/loggingresponsewriter.go +++ b/interceptor/middleware/loggingresponsewriter.go @@ -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 From 2a624031fca1781b34ed1c0761f9ed256db89286 Mon Sep 17 00:00:00 2001 From: Itay Ariel Date: Tue, 29 Aug 2023 15:51:22 +0300 Subject: [PATCH 2/4] chor: add changelog Signed-off-by: Jorge Turrado --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ecd267e..7d145884 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ This changelog keeps track of work items that have been completed and are ready - **Operator**: Remove ScaledObject `name` & `app` custom labels ([#717](https://github.com/kedacore/http-add-on/issues/717)) - **Scaler**: Provide graceful shutdown for grpc server on SIGINT and SIGTERM ([#731](https://github.com/kedacore/http-add-on/issues/731)) - **Scaler**: remplement custom interceptor metrics ([#718](https://github.com/kedacore/http-add-on/issues/718)) +- **Interceptor**: Add support for streaming responses ([#726](https://github.com/kedacore/http-add-on/issues/743)) ### Deprecations From 4d344f3083b1ba91b82b0e245ffd9a27980bd8f8 Mon Sep 17 00:00:00 2001 From: Itay Ariel Date: Fri, 15 Sep 2023 14:24:39 +0300 Subject: [PATCH 3/4] chor: update docs Signed-off-by: Jorge Turrado --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d145884..a604002d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ This changelog keeps track of work items that have been completed and are ready - **Operator**: Remove ScaledObject `name` & `app` custom labels ([#717](https://github.com/kedacore/http-add-on/issues/717)) - **Scaler**: Provide graceful shutdown for grpc server on SIGINT and SIGTERM ([#731](https://github.com/kedacore/http-add-on/issues/731)) - **Scaler**: remplement custom interceptor metrics ([#718](https://github.com/kedacore/http-add-on/issues/718)) -- **Interceptor**: Add support for streaming responses ([#726](https://github.com/kedacore/http-add-on/issues/743)) +- **Interceptor**: Add support for streaming responses ([#743](https://github.com/kedacore/http-add-on/issues/742)) ### Deprecations From 43da6baaaf39d7dfcd09b28b03072ec746e4295b Mon Sep 17 00:00:00 2001 From: Jorge Turrado Date: Wed, 4 Oct 2023 21:14:13 +0200 Subject: [PATCH 4/4] fix changelog Signed-off-by: Jorge Turrado --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a604002d..c57ac97a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,13 +28,13 @@ 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)) - **Scaler**: Provide graceful shutdown for grpc server on SIGINT and SIGTERM ([#731](https://github.com/kedacore/http-add-on/issues/731)) - **Scaler**: remplement custom interceptor metrics ([#718](https://github.com/kedacore/http-add-on/issues/718)) -- **Interceptor**: Add support for streaming responses ([#743](https://github.com/kedacore/http-add-on/issues/742)) ### Deprecations