Skip to content

aiohttp 3.13.4 rejects duplicate Server headers from Azure Blob Storage #12301

Description

@tbak-openai

Describe the bug

Hi aiohttp maintainers,

We hit a production regression after upgrading to aiohttp 3.13.4, which includes #12240. Requests to Azure Blob Storage that worked in 3.13.3 now fail with:

ClientResponseError: 400, message="Duplicate 'Server' header found."

I understand this change is intentional and RFC-motivated, but it is a breaking change in a patch release for clients talking to real-world servers that emit duplicate singleton response headers.

Impact:
This breaks Azure Blob Storage access for environments that pick up aiohttp 3.13.4 transitively.

To Reproduce

Repro:

  1. Send an authenticated GET to an Azure Blob container listing endpoint:
    https://<account>.blob.core.windows.net/<container>?restype=container&comp=list&maxresults=1
  2. The response is 200 OK, but includes two Server headers:
    Server: Microsoft-HTTPAPI/2.0
    Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
  3. aiohttp 3.13.3 accepts this response.
  4. aiohttp 3.13.4 rejects it with Duplicate 'Server' header found.

Expected behavior

Would you consider one of the following for 3.13.x?

  • restoring tolerant handling for duplicate singleton response headers
  • adding an opt-out / compatibility mode for strict response header validation
  • documenting this as a backward-incompatible change with a recommended client
    workaround

Logs/tracebacks

curl -v https://<account_name>.blob.core.windows.net/<container>\?restype\=container\&comp\=list\&maxresults\=1

Response:
HTTP/1.1 ...
...
< Server: Microsoft-HTTPAPI/2.0
< Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
...

Python Version

$ python --version
Python 3.12.9

aiohttp Version

$ python -m pip show aiohttp
Name: aiohttp
Version: 3.13.4
Summary: Async http client/server framework (asyncio)
Home-page: https://github.com/aio-libs/aiohttp
Author:
Author-email:
License: Apache-2.0 AND MIT
Location: .../lib/python3.12/site-packages
Requires: aiohappyeyeballs, aiosignal, attrs, frozenlist, multidict, propcache, yarl
Required-by: #N/A

multidict Version

$ python -m pip show multidict

propcache Version

$ python -m pip show propcache

yarl Version

$ python -m pip show yarl

OS

macOS

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions