Skip to content

Commit

Permalink
internal/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 f638a35 commit ff12255
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 @@ -209,6 +209,8 @@ func (f *Fetcher) RewriteCAsWithDataUrls(cas []types.Resource) error {

// Clean HTTP headers
cas[i].HTTPHeaders = nil
// the rewrite wipes the compression
cas[i].Compression = nil

encoded := dataurl.EncodeBytes(blob)
cas[i].Source = &encoded
Expand Down

0 comments on commit ff12255

Please sign in to comment.