-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fails to check ftp URLs with username and password #15
Comments
Sorry but the code actually returns true: |
@codelion The current behavior is to return true on the example you provided. Can you confirm and close this issue, or suggest another failing ftp example? |
@davisjam @chmursonss I updated the URL, I think it fails for FTP URLs with username and password. |
@codelion it's because your url is |
@villesau as per the RFC https://www.ietf.org/rfc/rfc1738.txt host name doesn’t have to end with a TLD. hostname = *[ domainlabel "." ] toplabel |
This seems to be an invalid URL: The port is what throws the regex off, the rest matches just fine. |
I also get this failure for a url like |
I was trying to test this library with GramTest, a grammar based test case generation tool (https://github.com/codelion/gramtest). I found that it fails to to check ftp URLs.
isUrl('ftp://username:password@hostname') //returns false
The text was updated successfully, but these errors were encountered: