Skip to content

smithy-http: disable redirects in aiohttp client - #764

Open
arandito wants to merge 1 commit into
smithy-lang:developfrom
arandito:aiohttp-disable-redirects
Open

smithy-http: disable redirects in aiohttp client#764
arandito wants to merge 1 commit into
smithy-lang:developfrom
arandito:aiohttp-disable-redirects

Conversation

@arandito

@arandito arandito commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

This PR disables automatic HTTP redirect following in the aiohttp client by passing allow_redirects=False to self._session.request(...). This ensures that 3xx responses are returned to the caller instead of being followed by the transport.

This aligns the aiohttp transport with SDK convention of not following redirects by default (e.g. botocore via Retry(False), and smithy-kotlin via OkHttp followRedirects(false)). The CRT transport is not updated because the CRT client already does not follow redirects (no behavior or option exists).

Testing

make check-py and make test-py pass (1793 passed, 9 skipped).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@arandito
arandito requested a review from a team as a code owner August 6, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant