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 HTTPS uri parsing and add tests for it #72

Merged

Conversation

dimon222
Copy link
Collaborator

@dimon222 dimon222 commented Dec 29, 2019

There was typo in condition (and vs or) which could cause side effects. This PR fixes it. + There was rare scenario when url has http/https in the beginning of domain. This PR will check proper part of url with ://.
+
To reduce amount of confusion/random regressions I've added tests for url parsing.

PS: @lresende @kevin-bates The patch for urlparse was backported to earlier pythons in sub version (for ex. 3.7.6), so unfortunately this #71 won't completely save us (#69 (comment)) . As soon as somebody updates to new version of python, they might get in issues when they use this specific kind of URL test.com:1234 (with no schema specified). To mitigate this, we have to make sure we cover corner cases - this PR, and then perhaps release another hotfix version on Pypi.

Copy link
Collaborator

@lresende lresende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - nice catch

@kevin-bates kevin-bates merged commit b27d807 into gateway-experiments:master Jan 11, 2020
@dimon222 dimon222 deleted the bugfix/better_url_parsing branch January 11, 2020 01:26
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