Skip to content

Commit

Permalink
fix: set content-encoding: gzip for non-legacy KV restore (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
danxmoran authored Jul 13, 2021
1 parent 88b5c74 commit a69f06b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clients/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (c Client) fullRestore(ctx context.Context, path string, legacy bool) error
// Upload metadata snapshots to the server.
log.Println("INFO: Restoring KV snapshot")
kvReq := c.PostRestoreKV(ctx).ContentType("application/octet-stream").Body(kvBytes)
if legacy {
if !legacy {
kvReq = kvReq.ContentEncoding("gzip")
}
if err := kvReq.Execute(); err != nil {
Expand Down

0 comments on commit a69f06b

Please sign in to comment.