fix: set content-encoding: gzip for non-legacy KV restore (#195)
This commit is contained in:
@ -166,7 +166,7 @@ func (c Client) fullRestore(ctx context.Context, path string, legacy bool) error
|
|||||||
// Upload metadata snapshots to the server.
|
// Upload metadata snapshots to the server.
|
||||||
log.Println("INFO: Restoring KV snapshot")
|
log.Println("INFO: Restoring KV snapshot")
|
||||||
kvReq := c.PostRestoreKV(ctx).ContentType("application/octet-stream").Body(kvBytes)
|
kvReq := c.PostRestoreKV(ctx).ContentType("application/octet-stream").Body(kvBytes)
|
||||||
if legacy {
|
if !legacy {
|
||||||
kvReq = kvReq.ContentEncoding("gzip")
|
kvReq = kvReq.ContentEncoding("gzip")
|
||||||
}
|
}
|
||||||
if err := kvReq.Execute(); err != nil {
|
if err := kvReq.Execute(); err != nil {
|
||||||
|
Reference in New Issue
Block a user