aa302209b0
Adds new `http` command supporting Streamable HTTP support, OAuth Metadata handler and Scope filtering. Co-authored-by: kerobbi <kerobbi@github.com> Co-authored-by: Matt Holloway <mattdholloway@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
22 lines
451 B
Go
22 lines
451 B
Go
package headers
|
|
|
|
import "strings"
|
|
|
|
// ParseCommaSeparated splits a header value by comma, trims whitespace,
|
|
// and filters out empty values
|
|
func ParseCommaSeparated(value string) []string {
|
|
if value == "" {
|
|
return []string{}
|
|
}
|
|
|
|
parts := strings.Split(value, ",")
|
|
result := make([]string, 0, len(parts))
|
|
for _, p := range parts {
|
|
trimmed := strings.TrimSpace(p)
|
|
if trimmed != "" {
|
|
result = append(result, trimmed)
|
|
}
|
|
}
|
|
return result
|
|
}
|