smallhadroncollider / brok

Find broken links in text documents
Other
425 stars 10 forks source link

InvalidUrlException #1

Closed lordcirth closed 5 years ago

lordcirth commented 5 years ago

I tried running brok on the SaltStack html docs:

root@salt-dev:~/brok# brok --cache 604800 /root/salt/doc/_build/html/ref/modules/all/* > /dev/null
brok: InvalidUrlException "http://user:password@securesite.com/secret-file.json"" "Invalid URL"
root@salt-dev:~/brok#

While this certainly is an invalid URL, I think this should be reported as an error, not cause a crash.

smallhadroncollider commented 5 years ago

Agreed!

The URL parser I wrote must be picking up some invalid URLs (it's still early days) and passing them along to http, which has a more detailed parser.

smallhadroncollider commented 5 years ago

Ah, I'd put my Exception capturing too low down in the code!

smallhadroncollider commented 5 years ago

Fixed in the develop branch. I'll do a fresh release in the morning.

smallhadroncollider commented 5 years ago

I lied. Have a release now: https://github.com/smallhadroncollider/brok/releases/tag/0.1.1