Skip to content

Client basic HTTP auth domain mismatch #1699

Closed
@krya

Description

Long story short

I was making calls with aiohttp client to one twilio API server (which requires basic HTTP authentication) and it was working fine untill I reached an endpoint that does a redirect to amazon S3.
But it appears that aiohttp passes basic authentication headers after redirection to a location defined in last response header even if domain doesnt match with the one that did redirection which causes an issue in my case because amazon requires that there should be only one auth method (in my cause token was in the url for redirection)
I've checked the requests lib and it works fine in this exact case.

Expected behaviour

once lib follows redirection and domain doesnt match with previous it should NOT send basic auth headers to this domain

Actual behaviour

end response from S3 ends with an authentication error since there is an auth token in the URL AND a basic auth headers

Steps to reproduce

I'm not sure on available to everyone server that does a redirection to S3

Your environment

ubuntu 14/16
aiohttp==1.3.3 (same with git master)

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions