Skip to content

Commit 04439b1

Browse files
fix: bug in storage of X-Varied-<header>
1 parent f58c533 commit 04439b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (t *transport) cacheResponse(req *http.Request, resp *http.Response) (*http
175175
cacheResp.Header = maps.Clone(resp.Header)
176176

177177
// Similar to httpcache, inject fake X-Varied-<header> "response" headers
178-
for _, header := range parseCommaSepHeader(req.Header, "Vary") {
178+
for _, header := range parseCommaSepHeader(resp.Header, "Vary") {
179179
header = http.CanonicalHeaderKey(header)
180180
if vals := req.Header.Values(header); len(vals) > 0 {
181181
if header == "Authorization" {

0 commit comments

Comments
 (0)