I'm using Microsoft storage emulator for development and in concrete, the method that gives me an error is the exists(), the error is a null pointer exception.
Looking deeply in the library, I was able to find that it was requesting a couple of headers, then I notice that the endpoint response from azure blob storage is different than from azure storage emulator:
From the emulator:
curl -G http://127.0.0.1:10000/devstoreaccount1/default?restype=container -v -H 'x-ms-version: 2019-07-07'
* Connected to 127.0.0.1 (127.0.0.1) port 10000 (#0)
> GET /devstoreaccount1/default?restype=container HTTP/1.1
> Host: 127.0.0.1:10000
> User-Agent: curl/7.51.0
> Accept: */*
> x-ms-version: 2019-07-07
>
< HTTP/1.1 200 OK
< Transfer-Encoding: chunked
< Last-Modified: Mon, 24 Feb 2020 18:21:08 GMT
< ETag: "0x8D7B95651C1DCC0"
< Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
< x-ms-request-id: 63875efa-4883-45fc-8dee-2481781ae3de
< x-ms-version: 2019-07-07
< x-ms-lease-status: unlocked
< x-ms-lease-state: available
< x-ms-blob-public-access: container
< Date: Mon, 24 Feb 2020 20:28:26 GMT
From storage:
curl -Gv https://account.blob.core.windows.net/default?restype=container -H 'x-ms-version: 2019-07-07'
> GET /roo?restype=container HTTP/1.1
> Host: account.blob.core.windows.net
> User-Agent: curl/7.51.0
> Accept: */*
> x-ms-version: 2019-07-07
>
< HTTP/1.1 200 OK
< Content-Length: 0
< Last-Modified: Mon, 24 Feb 2020 18:57:04 GMT
< ETag: "0x8D7B95B569707A4"
< Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
< x-ms-request-id: 9548781e-a01e-002f-0a51-eb0305000000
< x-ms-version: 2019-07-07
< x-ms-lease-status: unlocked
< x-ms-lease-state: available
< x-ms-has-immutability-policy: false
< x-ms-has-legal-hold: false
< x-ms-blob-public-access: container
< x-ms-default-encryption-scope: $account-encryption-key
< x-ms-deny-encryption-scope-override: false
< Date: Mon, 24 Feb 2020 20:29:01 GMT
<
* Curl_http_done: called premature == 0
* C
As you can see, there are a couple of headers missing in the storage emulator.
Is there a way to get around this ?
how recommended it is to wrap the exists()
method on my own just to be able to use the development storage emulator ?
Versions:
- StorageEmulator: 5.10
- SDK: 12.4.0
- Language: Java
Thanks.
Note: I have removed information as tls and ips from the curl responses.