diff --git a/sdk/core/src/headers/mod.rs b/sdk/core/src/headers/mod.rs index 42039c9cef..0656b4f6bb 100644 --- a/sdk/core/src/headers/mod.rs +++ b/sdk/core/src/headers/mod.rs @@ -371,3 +371,4 @@ pub const BLOB_COMMITTED_BLOCK_COUNT: HeaderName = HeaderName::from_static("x-ms-blob-committed-block-count"); pub const AZURE_ASYNCOPERATION: HeaderName = HeaderName::from_static("azure-asyncoperation"); pub const OPERATION_LOCATION: HeaderName = HeaderName::from_static("operation-location"); +pub const SOURCE_RANGE: HeaderName = HeaderName::from_static("x-ms-source-range"); diff --git a/sdk/storage_blobs/src/blob/operations/put_block_url.rs b/sdk/storage_blobs/src/blob/operations/put_block_url.rs index aeec9c5378..ec8bc8d2c3 100644 --- a/sdk/storage_blobs/src/blob/operations/put_block_url.rs +++ b/sdk/storage_blobs/src/blob/operations/put_block_url.rs @@ -9,6 +9,7 @@ operation! { block_id: BlockId, url: Url, ?hash: Hash, + ?range: Range, ?lease_id: LeaseId } @@ -23,6 +24,9 @@ impl PutBlockUrlBuilder { let mut headers = Headers::new(); headers.insert(COPY_SOURCE, self.url.to_string()); headers.add(self.lease_id); + if let Some(range) = self.range { + headers.insert(SOURCE_RANGE, format!("{range}")); + } let mut request = BlobClient::finalize_request(url, azure_core::Method::Put, headers, None)?;