The case is I'd like to add two headers with the same name, but different values while processing response from the backend server. More precisely under certain circumstances I'd like to append (not set) another Set-Cookie header to the original response from my Apache server to eventually return two cookies to the client. It seems that "set" action overrides all occurrences of the same header.
Is that possible?
You can use regsub() or regsuball() for the manipulation of HTTP headers.
https://www.varnish-cache.org/docs/2.1/reference/vcl.html
Edit: off the top of my head, it should look similar to the following