Azure / Azure/Azurite

Response returned in Azurite doesn't contain copyStatus property when use synchronous copy from URL operation

Open
#828 2 comments 5 reactions 1 assignee Claimed by @blueww View on GitHub
blob-storage bug
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

**Error Description:**
In Azure, response of synchronous copy from URL operation contains `copyStatus`.
But response returned in Azurite doesn't contain `copyStatus` property in this case.

**To Reproduce:**
```Typescript
import { BlobServiceClient, StorageSharedKeyCredential } from "@azure/storage-blob";
import { assert } from "chai";

async function main() {
const blobServiceClient = new BlobServiceClient("", new StorageSharedKeyCredential("", ""));
const containerClient = blobServiceClient.getContainerClient("");
await containerClient.create();
const content = "Hello World";
const blobClient = containerClient.getBlobClient("myblob");
const blockBlobClient = blobClient.getBlockBlobClient();
await blockBlobClient.upload(content, content.length);
const newBlobClient = containerClient.getBlobClient("newblob");
const copyURL = blobClient.url + "?" + "";
const result = await newBlobClient.syncCopyFromURL(copyURL);
assert.ok(result["copyStatus"]);
}

main();
```

**Error Track:**
The process code of synchronous copy from URL operation is shown as following(synchronous copy from URL operation matches the copy from URL operation with request header `x-ms-requires-sync`):
[https://github.com/Azure/Azurite/blob/master/src/blob/handlers/BlobHandler.ts#L852](https://github.com/Azure/Azurite/blob/master/src/blob/handlers/BlobHandler.ts#L852)
![image](https://user-images.githubusercontent.com/20970631/121666278-a6cc7d80-cadb-11eb-8b39-41d2cb0f40de.png)
As the picture shown, the response of synchronous copy from URL lacks `copyStatus` property in Azurite.

**Expected Behavior:**
Response returned in Azurite contains `copyStatus` property when use synchronous copy from URL operation.

@jongio for notification.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.