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

Adds $ to URL regex #9

Merged
merged 1 commit into from
Jun 3, 2021
Merged

Adds $ to URL regex #9

merged 1 commit into from
Jun 3, 2021

Conversation

cuducos
Copy link
Contributor

@cuducos cuducos commented Jun 3, 2021

I was trying to use this code to check URLs from Brazilian Federal Revenue, but some of them had a $ in the URL, e.g.: http://200.152.38.155/CNPJ/F.K03200$Z.D10510.MUNICCSV.zip (source).

This was a bug for verify-links:

$ go run main.go /tmp/urls.txt
Found 38 URIs
[200] http://200.152.38.155/CNPJ/K3241.K03200Y0.D10510.EMPRECSV.zip
[200] http://200.152.38.155/CNPJ/K3241.K03200Y4.D10510.ESTABELE.zip
[200] http://200.152.38.155/CNPJ/K3241.K03200Y4.D10510.SOCIOCSV.zip
[200] http://200.152.38.155/CNPJ/K3241.K03200Y8.D10510.SOCIOCSV.zip
[200] http://200.152.38.155/CNPJ/K3241.K03200Y0.D10510.SOCIOCSV.zip
[404] http://200.152.38.155/CNPJ/F.K03200
…

(This last line was cut just at the $.)

I suggest we add $ to the URL regex, which made this bug go away in this specific use case : )

@ellisonleao ellisonleao merged commit 855200c into ellisonleao:main Jun 3, 2021
@ellisonleao
Copy link
Owner

thanks!

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.

2 participants