fixed working with headers and cookies (#154)
Some checks failed
coverage / build (push) Successful in 3m33s
test / test (push) Failing after 16m33s
sync / sync (push) Successful in 11s

This commit is contained in:
2025-06-05 01:12:06 +05:00
committed by GitHub
parent 4a6414b2b8
commit b93e634873

View File

@@ -85,7 +85,7 @@ func newRequest(ctx context.Context, log logger.Logger, addr string, req client.
m = make(map[string]string) m = make(map[string]string)
parameters["header"] = m parameters["header"] = m
} }
for idx := 0; idx < len(k)/2; idx += 2 { for idx := 0; idx+1 < len(k); idx += 2 {
m[k[idx]] = k[idx+1] m[k[idx]] = k[idx+1]
} }
} }
@@ -98,7 +98,7 @@ func newRequest(ctx context.Context, log logger.Logger, addr string, req client.
m = make(map[string]string) m = make(map[string]string)
parameters["cookie"] = m parameters["cookie"] = m
} }
for idx := 0; idx < len(k)/2; idx += 2 { for idx := 0; idx+1 < len(k); idx += 2 {
m[k[idx]] = k[idx+1] m[k[idx]] = k[idx+1]
} }
} }