Multiple response headers with same name are not set on http response
steinfletcher opened this issue · comments
I am trying to set multiple cookies with the same name on the gock response, but it always seems to only set the first cookie on the response object.
Am I doing something wrong - is there a better way to set cookies?
The mergeHeaders function appears to be the culprit. I have a solution and test here: steinfletcher@75ea39d
Thanks
Right, in such case multiple headers should exist with the same key. Would you mind sending a PR? Thank you.
Submitted PR, but a test fails in CI that I can't reproduce locally. Seems unrelated. It looks like tip
fails, but tests run fine for me on go 1.11 (stable). Might be an option to run against stable
instead of tip
, but interesting that tip
fails.
Many thanks.
Thanks for the PR!
New patch version is now available. Try upgrading the package.