mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-05-10 19:26:56 +00:00
update go dependencies
This commit is contained in:
4
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
generated
vendored
4
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
generated
vendored
@@ -28,7 +28,9 @@ func ForwardResponseStream(ctx context.Context, mux *ServeMux, marshaler Marshal
|
||||
}
|
||||
handleForwardResponseServerMetadata(w, mux, md)
|
||||
|
||||
w.Header().Set("Transfer-Encoding", "chunked")
|
||||
if !mux.disableChunkedEncoding {
|
||||
w.Header().Set("Transfer-Encoding", "chunked")
|
||||
}
|
||||
if err := handleForwardResponseOptions(ctx, w, nil, opts); err != nil {
|
||||
HTTPError(ctx, mux, marshaler, w, req, err)
|
||||
return
|
||||
|
||||
11
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
generated
vendored
11
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
generated
vendored
@@ -73,6 +73,7 @@ type ServeMux struct {
|
||||
disablePathLengthFallback bool
|
||||
unescapingMode UnescapingMode
|
||||
writeContentLength bool
|
||||
disableChunkedEncoding bool
|
||||
}
|
||||
|
||||
// ServeMuxOption is an option that can be given to a ServeMux on construction.
|
||||
@@ -125,6 +126,16 @@ func WithMiddlewares(middlewares ...Middleware) ServeMuxOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithDisableChunkedEncoding disables the Transfer-Encoding: chunked header
|
||||
// for streaming responses. This is useful for streaming implementations that use
|
||||
// Content-Length, which is mutually exclusive with Transfer-Encoding:chunked.
|
||||
// Note that this option will not automatically add Content-Length headers, so it should be used with caution.
|
||||
func WithDisableChunkedEncoding() ServeMuxOption {
|
||||
return func(mux *ServeMux) {
|
||||
mux.disableChunkedEncoding = true
|
||||
}
|
||||
}
|
||||
|
||||
// SetQueryParameterParser sets the query parameter parser, used to populate message from query parameters.
|
||||
// Configuring this will mean the generated OpenAPI output is no longer correct, and it should be
|
||||
// done with careful consideration.
|
||||
|
||||
Reference in New Issue
Block a user