Skip to content

azure_data_tables 0.21: all table operations fail with 'header not found server' when storage account omits Server header #4489

@Alan-Jowett

Description

@Alan-Jowett

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:

header not found server

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.

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type
No fields configured for issues without a type.

Projects

Status
Untriaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions