appendVaryHeader appends the given key to the `Vary` header.
(header http.Header, key string)
| 167 | |
| 168 | // appendVaryHeader appends the given key to the `Vary` header. |
| 169 | func appendVaryHeader(header http.Header, key string) { |
| 170 | vary := header.Get("Vary") |
| 171 | if vary == "" { |
| 172 | header.Set("Vary", key) |
| 173 | } else { |
| 174 | header.Set("Vary", vary+", "+key) |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | // concatBytes concatenates two byte slices. |
| 179 | func concatBytes(a, b []byte) []byte { |