Summary
All Azure Table Storage operations via azure_data_tables 0.21.0 fail with header not found server when the storage account response does not include a Server HTTP header.
Versions
azure_data_tables 0.21.0
azure_storage 0.21.0
azure_core 0.21.0
Observed behavior
Every table operation (point reads via EntityClient::get(), queries via TableClient::query(), inserts) fails with:
The error originates from CommonStorageResponseHeaders in azure_storage::headers which unconditionally requires the server header:
// azure_storage-0.21.0/src/headers/mod.rs
impl TryFrom<&Headers> for CommonStorageResponseHeaders {
fn try_from(headers: &Headers) -> azure_core::Result<Self> {
Ok(Self {
request_id: request_id_from_headers(headers)?,
client_request_id: client_request_id_from_headers_optional(headers),
version: version_from_headers(headers)?,
date: date_from_headers(headers)?,
server: server_from_headers(headers)?, // fails here
})
}
}
server_from_headers calls headers.get_as(&SERVER) which returns an error when the header is absent.
How to reproduce
We have two Azure Storage accounts (both StorageV2, Standard_LRS, eastus). One returns the Server header, the other does not:
Storage account A (works):
Server: Windows-Azure-Table/1.0, Microsoft-HTTPAPI/2.0
Cache-Control: no-cache
x-ms-request-id: ...
x-ms-version: 2019-02-02
Date: ...
Content-Type: application/json; odata=fullmetadata; ...
Storage account B (fails):
Cache-Control: no-cache
x-ms-request-id: ...
x-ms-version: 2019-02-02
Date: ...
Content-Type: application/json; odata=fullmetadata; ...
(No Server header)
Both accounts are queried with the same API version (x-ms-version: 2019-02-02) and the same azure_data_tables 0.21.0 code.
Response headers were verified via direct HTTP calls:
# Point read
Invoke-WebRequest -Uri "https://<account>.table.core.windows.net/actualstate(PartitionKey='...',RowKey='state')" `
-Headers @{Authorization="Bearer $token"; Accept="application/json;odata=fullmetadata"; "x-ms-version"="2019-02-02"}
# Query
Invoke-WebRequest -Uri "https://<account>.table.core.windows.net/actualstate()?`$filter=..." `
-Headers @{Authorization="Bearer $token"; Accept="application/json;odata=fullmetadata"; "x-ms-version"="2019-02-02"}
Both point reads and queries against storage account B return successful 200 responses with valid JSON bodies, but no Server header. The SDK fails parsing the response headers before the application code ever sees the data.
Impact
This is a production blocker. Our Azure Function handler processes messages from a Storage Queue and writes/reads Azure Table Storage. All table operations against the affected storage account fail, causing messages to be moved to the poison queue after 5 retries.
Application Insights log
handler invocation failed error="load gateway actual-state row failed: header not found server"
Expected behavior
The server field on CommonStorageResponseHeaders should be Option<String> since Azure does not guarantee the Server header is present in all responses.
Summary
All Azure Table Storage operations via
azure_data_tables0.21.0 fail withheader not found serverwhen the storage account response does not include aServerHTTP header.Versions
azure_data_tables0.21.0azure_storage0.21.0azure_core0.21.0Observed behavior
Every table operation (point reads via
EntityClient::get(), queries viaTableClient::query(), inserts) fails with:The error originates from
CommonStorageResponseHeadersinazure_storage::headerswhich unconditionally requires theserverheader:server_from_headerscallsheaders.get_as(&SERVER)which returns an error when the header is absent.How to reproduce
We have two Azure Storage accounts (both
StorageV2,Standard_LRS,eastus). One returns theServerheader, the other does not:Storage account A (works):
Storage account B (fails):
(No
Serverheader)Both accounts are queried with the same API version (
x-ms-version: 2019-02-02) and the sameazure_data_tables0.21.0 code.Response headers were verified via direct HTTP calls:
Both point reads and queries against storage account B return successful 200 responses with valid JSON bodies, but no
Serverheader. The SDK fails parsing the response headers before the application code ever sees the data.Impact
This is a production blocker. Our Azure Function handler processes messages from a Storage Queue and writes/reads Azure Table Storage. All table operations against the affected storage account fail, causing messages to be moved to the poison queue after 5 retries.
Application Insights log
Expected behavior
The
serverfield onCommonStorageResponseHeadersshould beOption<String>since Azure does not guarantee theServerheader is present in all responses.