Skip to content

Commit

Permalink
interal/resource/http: clear CA compression on rewrite
Browse files Browse the repository at this point in the history
CAs are re-written into the fetched config as a base64 string to allow
cached reads to not require an additional fetch. When compression
support was added during the resource consolidation refactor for the
3.1.0 spec this interaction was missed.

The blackbox tests did not catch this as they were always clearing the
config cache on each run.
  • Loading branch information
arithx committed Jul 7, 2020
1 parent f769c7c commit fd44f23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/resource/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ func (f *Fetcher) RewriteCAsWithDataUrls(cas []types.Resource) error {

encoded := dataurl.EncodeBytes(blob)
cas[i].Source = &encoded
// the rewrite wipes the compression
cas[i].Compression = nil
}
return nil
}
Expand Down

0 comments on commit fd44f23

Please sign in to comment.