1
votes

I set up a container in Azure to store blob objects. When using createBlockBlob method within the Azure PHP SDK I receive the following error output:

400: Fail: Code: 400 Value: The value for one of the HTTP headers is not in the correct format. details (if any): <?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format. RequestId: Time:2016-02-18T14:33:05.9196494Z</Message><HeaderName>x-ms-version</HeaderName><HeaderValue>2012-02-12</HeaderValue></Error>.<br />

So far I figured out that the Azure PHP SDK might not be up to date according to this website: https://azure.microsoft.com/en-us/blog/microsoft-azure-storage-service-version-removal/

A guy on GitHub states that changing the x-ms-version header should solve the issue: https://github.com/Azure/azure-sdk-for-python/issues/288#issuecomment-74399273 Unfortunately I can't figure out on how to change the x-ms-version header within the Azure PHP SDK.

Any ideas on how to solve that?

1

1 Answers

2
votes

x-ms-version header value is picked from STORAGE_API_LATEST_VERSION variable defined in WindowsAzure\Common\Internal\Resources.php file. You may want to change that.