Minor fix for hostname with underscores#207
Closed
K3VRAL wants to merge 3 commits intopython-validators:masterfrom
Closed
Minor fix for hostname with underscores#207K3VRAL wants to merge 3 commits intopython-validators:masterfrom
K3VRAL wants to merge 3 commits intopython-validators:masterfrom
Conversation
After more testing and reading online where underscores can be legal in which parts of the URL, I found that underscores can be legal in the beginning of the subdomain which my code did not reflect correctly according to https://stackoverflow.com/questions/2180465/can-domain-name-subdomains-have-an-underscore-in-it.
I forgot to remove the conditional character while it was inside the "many of" characters.
Author
|
One issue I currently am seeing right now and might need some time to be processed before anything should happen is that subdomains don't get the correct treatment with the underscores, such as: I'll need to do more testing before doing anything with this pull request. |
|
I confirm I have the same problem. I was about to open an issue.. Thanks ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello! I've noticed that I had some errors when getting a URL with a hostname that has an underscore, so I thought of finding and making some changes to the code such that URLs with an underscore in the hostname will now be valid, example:
https://_this_is_an.example.com
I was unable to test with the testing folder of the project, mainly because I don't really know how either because there is no documentation or I am looking in the wrong areas, or I lack experience with python testing with how this project is structured. I did use my own method of testing (using grep and the -P argument) and the results worked in the favor I was intending for, so hopefully it works in the code as well.
I was also inspired that this issue has already been hinted at but not fixed.
Closes #102
Closes #180
Maybe closes #38
And maybe something should happen to #179