We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1608578 commit fe6e50dCopy full SHA for fe6e50d
pkg/kubelet/server/server.go
@@ -824,15 +824,17 @@ func trimURLPath(path string) string {
824
return parts[0]
825
}
826
827
+var longRunningRequestPathMap = map[string]bool{
828
+ "exec": true,
829
+ "attach": true,
830
+ "portforward": true,
831
+ "debug": true,
832
+}
833
+
834
// isLongRunningRequest determines whether the request is long-running or not.
835
func isLongRunningRequest(path string) bool {
- longRunningRequestPaths := []string{"exec", "attach", "portforward", "debug"}
- for _, p := range longRunningRequestPaths {
- if p == path {
- return true
- }
- return false
836
+ _, ok := longRunningRequestPathMap[path]
837
+ return ok
838
839
840
// ServeHTTP responds to HTTP requests on the Kubelet.
0 commit comments