Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix host/port handling in UrlRequest #5421

Merged
merged 2 commits into from
Oct 10, 2017
Merged

Fix host/port handling in UrlRequest #5421

merged 2 commits into from
Oct 10, 2017

Conversation

KeyWeeUsr
Copy link
Contributor

Closes #2575

Note that this does NOT handle the authentication, just appends user:pass part to the host if applicable, therefore the host + port part is handled correctly, however, when the credentials are specified, it will most likely fail (no test url to check unfortunately) if it's not handled via HTTPConnection or socket (probably not).

@tshirtman
Copy link
Member

http://httpbin.org/ can be used to check http protocl, it has enpoints for authentication

@KeyWeeUsr KeyWeeUsr merged commit 134bd65 into master Oct 10, 2017
@KeyWeeUsr KeyWeeUsr deleted the fix_urlrequest_parse branch October 10, 2017 22:24
@KeyWeeUsr
Copy link
Contributor Author

Thanks for the link, I could implement basic auth with that. I removed those manual checks for URL parsing as we use the defaults from urllib now (CPython has unittests for that) + added cases for auth through header and via this syntax:

http://user:pass@domain.xyz

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.

None yet

3 participants