Closed majumd closed 4 years ago
@majumd Hi, we haven't officially supported Azure Storage Hub yet, but cpplite sdk should be able to work with it.
Can you provide some information so that we can further investigate?
In addition, please avoid using that blob_client_wrapper
and always stick to blob_client
like in this sample.
Hi, I have modified code as per sample given by you to use blob_client but still it gives error. "The value of one of the HTTP headers is not in correct format"
TCP_NODELAY set
Connected to fsmagicstorageacc1.blob.dazs1.wwtrrratc.com (10.253.xx.xx) port 443 (#0)
HEAD /fs-magic-container1?restype=container HTTP/1.1 Host: fsmagicstorageacc1.blob.dazs1.wwtrrratc.com Accept: / x-ms-date: Fri, 19 Jun 2020 08:13:25 GMT x-ms-version: 2018-11-09 Authorization: SharedKey fsmagicstorageacc1:xxxxxTt4=
Mark bundle as not supporting multiuse < HTTP/1.1 400 The value for one of the HTTP headers is not in the correct format. < Transfer-Encoding: chunked < Server: Microsoft-HTTPAPI/2.0 < x-ms-request-id: e372d166-3981-0721-6837-d070dcd34264 < Date: Fri, 19 Jun 2020 08:28:28 GMT <
Connection #0 to host fsmagicstorageacc1.blob.dazs1.wwtrrratc.com left intact
I have used the following std::string account_name = "fsmagicstorageacc1"; std::string account_key = "xxxxQ=="; // Storage account key if using shared key auth std::string blob_endpoint = "fsmagicstorageacc1.blob.dazs1.wwtrrratc.com/";
The names are correct names. I have given just for representation. The key used above is the user access key obtained by logging into portal.
Dashboard > Storage accounts >
@majumd can you also share the error response body?
This is the only HTTP header response which is being returned. HTTP/1.1 400 The value for one of the HTTP headers is not in the correct format.
It would have been nice if it could return which header is not in correct format.
Hi @majumd, the request header looks completely normal and I believe it's going to work if running against Azure Storage server.
This C++ sdk is targeted at Azure Storage server. Any other kind of server including Azure Stack is supposed to expose exactly the same interface as Azure Storage if they want to be able to work with client sdk. So I think your request failed because Azure Stack server behaves differently.
Hi, For the error specified by @majumd, I am getting the error response body as :
Code : InvalidHeaderValue
Message : The value for one of the HTTP headers is not in the correct format. RequestId:6abd80a3-3c81-0a33-6566-4c83d6bd9132 Time:2020-06-19T12:57:25.5124783Z
HeaderName : x-ms-version
HeaderValue : 2018-11-09
From the error body it seems that, storage service version "2018-11-09" is used while getting the container properties. Does this version is supported by cpp lite version of Azure Storage client library(v0.3 version)?
Hi @snehalw777 , seems your Azure Stack doesn't support this API version. Can you edit here and try 2019-02-02
, 2019-07-07
and 2019-10-10
?
If those don't work, you can also try some older versions like 2018-03-28
, 2017-11-09
, 2017-07-29
.
Thanks for the reference @JinmingHu-MSFT It worked with older API version.
@snehalw777 Okay, I think you can use the old API version. But 2018-11-09
is an API version with breaking changes, which means that there might be one or more API in this sdk that cannot function properly if you just change the API version. So Please do use test cases to cover those API you're going to use to make sure everything works fine.
I am closing this issue because this lite version v0.3 started working using API version 2017-11-09 on an Azure Stack Hub setup of version 2002(latest version).
Hi,
I am using the cpp lite version of Azure Storage Client Library. I am using v0.3 version. I am connecting to a Dell Azure Stack Hub of version IdentitySystem : AzureAD OemVersion : 2.1.1908.3 StampVersion : 1.2002.19.73
Can the v0.3 version connect to the above Azure Stack Hub versions? Am i using the right version of the client library?