MCPcopy Index your code
hub / github.com/keploy/keploy / getHeaderValueCaseInsensitive

Function getHeaderValueCaseInsensitive

pkg/util.go:1041–1049  ·  view source on GitHub ↗
(headers map[string]string, key string)

Source from the content-addressed store, hash-verified

1039}
1040
1041func getHeaderValueCaseInsensitive(headers map[string]string, key string) string {
1042 key = strings.ToLower(strings.TrimSpace(key))
1043 for k, v := range headers {
1044 if strings.ToLower(strings.TrimSpace(k)) == key {
1045 return v
1046 }
1047 }
1048 return ""
1049}
1050
1051func hasSSEContentType(value string) bool {
1052 return strings.Contains(strings.ToLower(value), "text/event-stream")

Callers 3

DetectHTTPStreamConfigFunction · 0.85
isSSETestCaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected