Samin061 commented on PR #70000: URL: https://github.com/apache/airflow/pull/70000#issuecomment-5251070781
Makes sense, done. Added the async side to this PR so both hooks are covered here. Both now share one `_redirect_strips_headers` helper for the host-change decision. The sync hook keeps the `Session` subclass because `rebuild_auth` is the per-redirect hook `requests` gives us; `aiohttp` has no equivalent, so `HttpAsyncHook` follows the redirect chain itself with `allow_redirects=False` and drops the connection-supplied header names on a cross-host hop using that same helper. To keep the blast radius small the async hook only takes over redirect handling when the Connection actually contributed headers, otherwise `aiohttp`'s native handling is untouched. Same-host redirects still carry the headers. Added a parametrized async test mirroring the sync one (cross-host strips, same-host keeps), and this now folds in #70164. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
