From 0e7bf5a2adb2e3bb9b0177dbf94a3b9957e24478 Mon Sep 17 00:00:00 2001 From: Guilherme Macedo Date: Sun, 2 Aug 2020 23:23:37 +0200 Subject: [PATCH] Save multiple set-cookie headers when returned by the server --- executors/http/executor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/executors/http/executor.go b/executors/http/executor.go index e50fac16..740dda43 100644 --- a/executors/http/executor.go +++ b/executors/http/executor.go @@ -175,7 +175,11 @@ func (Executor) Run(testCaseContext venom.TestCaseContext, l venom.Logger, step if !e.SkipHeaders { r.Headers = make(map[string]string) for k, v := range resp.Header { - r.Headers[k] = v[0] + if strings.ToLower(k) == "set-cookie" { + r.Headers[k] = strings.Join(v[:], "; ") + } else { + r.Headers[k] = v[0] + } } l.Debugf("http.Response.Headers (%q)", r.Headers) }