Skip to content

Commit

Permalink
Work on
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Oct 16, 2017
1 parent 47072ca commit cc97b8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ def _request(self, method, url, *,
elif not scheme:
r_url = url.join(r_url)

if url.origin() != r_url.origin():
auth = None
headers.pop(hdrs.AUTHORIZATION)

url = r_url
params = None
resp.release()
Expand Down
7 changes: 7 additions & 0 deletions aiohttp/client_reqrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ def update_host(self, url):
if not url.host:
raise InvalidURL(url)

# basic auth info
username, password = url.user, url.password
if username:
self.auth = helpers.BasicAuth(username, password or '')

# Record entire netloc for usage in host header

scheme = url.scheme
self.ssl = scheme in ('https', 'wss')

Expand Down

0 comments on commit cc97b8e

Please sign in to comment.