From c8c4051aa7bd2b590f097b121b5ea8f659c2eed8 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 20 Sep 2019 13:19:55 +0200 Subject: [PATCH] src/client/http_client.rs - H2Client::upload: fix parameter order --- src/client/http_client.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index 820f6584..3cc63636 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -608,7 +608,7 @@ impl BackupClient { content_type: &str, data: Vec, ) -> Result { - self.h2.upload(path, "POST", param, content_type, data).await + self.h2.upload("POST", path, param, content_type, data).await } pub async fn upload_put( @@ -618,7 +618,7 @@ impl BackupClient { content_type: &str, data: Vec, ) -> Result { - self.h2.upload(path, "PUT", param, content_type, data).await + self.h2.upload("PUT", path, param, content_type, data).await } pub async fn finish(self: Arc) -> Result<(), Error> { @@ -647,7 +647,7 @@ impl BackupClient { let csum = openssl::sha::sha256(&raw_data); let param = json!({"encoded-size": raw_data.len(), "file-name": file_name }); let size = raw_data.len() as u64; // fixme: should be decoded size instead?? - let _value = self.h2.upload("blob", "POST", Some(param), "application/octet-stream", raw_data).await?; + let _value = self.h2.upload("POST", "blob", Some(param), "application/octet-stream", raw_data).await?; Ok(BackupStats { size, csum }) } @@ -676,7 +676,7 @@ impl BackupClient { let csum = openssl::sha::sha256(&raw_data); let param = json!({"encoded-size": raw_data.len(), "file-name": file_name }); - let _value = self.h2.upload("blob", "POST", Some(param), "application/octet-stream", raw_data).await?; + let _value = self.h2.upload("POST", "blob", Some(param), "application/octet-stream", raw_data).await?; Ok(BackupStats { size, csum }) } @@ -708,7 +708,7 @@ impl BackupClient { "encoded-size": raw_data.len(), "file-name": file_name, }); - self.h2.upload("blob", "POST", Some(param), "application/octet-stream", raw_data).await?; + self.h2.upload("POST", "blob", Some(param), "application/octet-stream", raw_data).await?; Ok(BackupStats { size, csum }) }