[英]Invalid x-ms-version header in Azure PHP SDK with blob storage
我在Azure中設置了一個容器來存儲Blob對象。 在Azure PHP SDK中使用createBlockBlob
方法時,收到以下錯誤輸出:
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 />
到目前為止,我發現根據該網站,Azure PHP SDK可能不是最新的: https : //azure.microsoft.com/en-us/blog/microsoft-azure-storage-service-version-removal/
GitHub上的一個人指出更改x-ms-version
標頭應該可以解決此問題: https : //github.com/Azure/azure-sdk-for-python/issues/288#issuecomment-74399273不幸的是我無法弄清楚了解如何在Azure PHP SDK中更改x-ms-version
標頭。
關於如何解決的任何想法?
x-ms-version
標頭值是從WindowsAzure\\Common\\Internal\\Resources.php
文件中定義的STORAGE_API_LATEST_VERSION
變量中選取的。 您可能要更改它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.