Skip to content

Commit

Permalink
Configure aiohttp to not rewrite redirect URLs.
Browse files Browse the repository at this point in the history
closes #919
  • Loading branch information
ipanova committed Jul 14, 2022
1 parent 6b25e0e commit fa2073a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES/919.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Configured aiohttp to avoid rewriting redirect URLs, as some web servers
(e.g. Amazon CloudFront) can be tempermental about the encoding of the URL.
4 changes: 3 additions & 1 deletion pulp_container/app/downloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ def _make_aiohttp_session_from_remote(self):
timeout = aiohttp.ClientTimeout(
total=total, sock_connect=sock_connect, sock_read=sock_read, connect=connect
)
return aiohttp.ClientSession(connector=conn, timeout=timeout, headers=headers)
return aiohttp.ClientSession(
connector=conn, timeout=timeout, headers=headers, requote_redirect_url=False
)

def _http_or_https(self, download_class, url, **kwargs):
"""
Expand Down

0 comments on commit fa2073a

Please sign in to comment.