webdav: disable server-side compression (#1100)

Fixes #1098
This commit is contained in:
Jarek Kowalski
2021-05-28 19:36:09 -07:00
committed by GitHub
parent 6811f1fae1
commit 3a15f666f4

View File

@@ -197,6 +197,9 @@ func isRetriable(err error) bool {
func New(ctx context.Context, opts *Options) (blob.Storage, error) {
cli := gowebdav.NewClient(opts.URL, opts.Username, opts.Password)
// Since we're handling encrypted data, there's no point compressing it server-side.
cli.SetHeader("Accept-Encoding", "identity")
if opts.TrustedServerCertificateFingerprint != "" {
cli.SetTransport(tlsutil.TransportTrustingSingleCertificate(opts.TrustedServerCertificateFingerprint))
}