tests: fix parse header tests

This commit is contained in:
Stavros
2025-07-08 00:54:36 +03:00
parent c662b9e222
commit 0f4a6b5924
2 changed files with 2 additions and 2 deletions

View File

@@ -188,7 +188,7 @@ func ParseHeaders(headers []string) map[string]string {
// Loop through the headers
for _, header := range headers {
split := strings.SplitN(header, "=", 2)
if len(split) != 2 {
if len(split) != 2 || strings.TrimSpace(split[0]) == "" || strings.TrimSpace(split[1]) == "" {
log.Warn().Str("header", header).Msg("Invalid header format, skipping")
continue
}