Open cloudtest-anon opened 1 year ago
@anna-mazhar
Could you please give the whole debug log of the failed request? We would need it for the investigation. And could you share which tool you use to send the rest API?
Besides that, it looks the "x-ms-copy-source" you input is not a valid Uri. Could you please input the whole source blob Uri and try again?
Here is the log: debug.log The rest API call was made with a test framework written in python.
As previously mentioned, the server will only return a 500 Internal Server Error when the requested URI (x-ms-copy-source) is invalid, such as when a string like "blob22" or a relative URI, as shown in the example above, is used. If a valid absolute URI is used instead, the request will succeed without any issues.
@anna-mazhar
Thanks for the information! Would you please share is there any scenario on you side blocked for this issue? We need the info to evaluate the priority of the issue. Besides that, Could you share the error returned from product Azure in the case? The detail error should include error message, error code, status code ... (hide credential if any) So we can reference it to fix this issue.
The response provided by Azurite was insufficient in assisting me with pinpointing the bug in my code until I switched to the actual cloud service.
Response from Azure Storage for the same request:
`'HTTP/1.1 400 The value for one of the HTTP headers is not in the correct format. .. \r\nx-ms-error-code: InvalidHeaderValue ..
InvalidHeaderValue
@anna-mazhar
Thanks for the info! Will look into it and update you later.
However, as this issue won't block the normal scenario, and we are working on some new storage feature implementing in Azurite, this might won't be our priority recently.
Azurite welcome contribution! It would be great if you could raise a PR to fix it!
Which service(blob, file, queue, table) does this issue concern?
Azure Blob
Which version of the Azurite was used?
3.21.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
What's the Node.js version?
14.18.1
What problem was encountered?
When a PUT request is made to copy a blob from a given source that is not a URL, the request fails with a 500 Internal Server Error. The error response should instead be 400 (Bad Request) since a valid URL is expected as the source. Request:
Response:
Steps to reproduce the issue?
The following REST calls should hit this case:
Debug log