fix: Support streaming HTTP responses (#2956)

* all: Upgrade listenerutil dependency

The new listenerutil implements http.Flusher, which is necessary
for streaming responses from the grpc-gateway to work.

* daemon/controller: Remove newline delimiter in streaming responses

The default gRPC-Gateway HTTPBody marshaler uses newlines
as a delimiter. This introduces newlines in our streamed responses.
Wrapping the default marshaler lets us define a nil delimiter, which
ensures our streaming responses are unaffected by the server side
chunking.
This commit is contained in:
Johan Brandhorst-Satzkorn authored and GitHub committed 2023-02-13 14:56:53 -05:00
1 parent bb6d1cad58
commit cf412b95a2
6 files changed
+81 -6

No files matched your search

+1 -1
View File
@@ -80,7 +80,7 @@ func createMuxWithEndpoints(c *Controller, props HandlerProperties) (http.Handle
return p == uiPath
}
return http.HandlerFunc(mux.ServeHTTP), isUiRequest, nil
return mux, isUiRequest, nil
}
// apiHandler returns an http.Handler for the services. This can be used on