Repository: caddyserver/caddy (language: go)

Issue:
Caddyfile `vars` matcher only keeps the last configured values
If the `vars` matcher is specified multiple times, only the last one's values will be retained. e.g.

```
vars foo a b c d e
vars foo 1 2 3 4 5
```

Only values `1 2 3 4 5` will be kept.

Simple fix, we just need to `append()` instead, to keep all of `a b c d e 1 2 3 4 5`

I'm feeling too lazy to write the PR right now, so I'm logging the issue for now.


Discussion / hints:

Fix patch:
diff --git a/modules/caddyhttp/vars.go b/modules/caddyhttp/vars.go
index 91a2072c092..b0f10a7fce1 100644
--- a/modules/caddyhttp/vars.go
+++ b/modules/caddyhttp/vars.go
@@ -91,7 +91,7 @@ func (m *VarsMatcher) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
 		if len(vals) == 0 {
 			return d.Errf("malformed vars matcher: expected at least one value to match against")
 		}
-		(*m)[field] = vals
+		(*m)[field] = append((*m)[field], vals...)
 		if d.NextBlock(0) {
 			return d.Err("malformed vars matcher: blocks are not supported")
 		}


Test patch: