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

Split used to get port #128

Closed
tobiasdroste opened this issue Feb 2, 2022 · 4 comments
Closed

Split used to get port #128

tobiasdroste opened this issue Feb 2, 2022 · 4 comments

Comments

@tobiasdroste
Copy link

I figure rsplit should be used here instead of split to get the port. Otherwise we run into an issue with ipv6 addresses.

px/px.py

Line 1082 in 5bacc57

spl = netloc.split(":", 1)

@genotrance
Copy link
Owner

I could push a fix for this but have no way to test in an IPv6 environment. There are surely more issues to get it working: e.g. #98. And also:

px/px.py

Line 1104 in 5bacc57

ipport = netloc.split(":")

Will be glad to merge a PR that adds IPv6 support.

@tobiasdroste
Copy link
Author

tobiasdroste commented Feb 2, 2022

I just ran into an error for line 1084 (cause for this error was line 1082) and was able to fix it locally by using rsplit instead of split.

There may be other places that need to be adjusted but it would be a first step in the right direction to replace this split command by rsplit (it doesn't break ipv4 addresses as for those rsplit and split should always lead to the same result).

Since I fixed this locally I didn't run into the error again.

@genotrance
Copy link
Owner

Thanks for clarifying - I've made some fixes so hopefully this should work now.

@tobiasdroste
Copy link
Author

Thanks for the fix! 😃

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

No branches or pull requests

2 participants