Skip to content

Should the user-agent header python-httpx/0.28.1 be propagated? #22

@jamesbraza

Description

@jamesbraza

As of httpx-aiohttp==0.1.8, all headers are propagated to the aiohttp.ClientSession.request: https://github.com/karpetrosyan/httpx-aiohttp/blob/0.1.8/httpx_aiohttp/transport.py#L154

However, this will propagate the header 'user-agent': 'python-httpx/0.28.1'.

It sort of feels weird to propagate this httpx-inserted header because the request is actually coming from an aiohttp.ClientSession. What do you think?

Perhaps there should be a header filtration parameter exposed in httpx_aiohttp.AiohttpTransport, if people want to filter this one out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions