url: fix/8722

This patch attempts to close this issue #8722:
- [x] feature
- [x] test
- [x] documentation
- [x] fix some style conflicts with `jshint` in test-url.js

R=@indutny, @chrisdickinson :cherries: 
Hey @chrisdickinson, please review the above 5 tests from here, it follows your digram and description: `higher than lower`. btw, thanks for your such detailed digram, that's helpful and super awesome :cherries: