mcollina / autocannon

fast HTTP/1.1 benchmarking tool written in Node.js
MIT License
7.83k stars 325 forks source link

Should we ensure strings start with `http`? #68

Closed GlenTiki closed 8 years ago

GlenTiki commented 8 years ago

I ask because if you do something like autocannon google.com it doesn't recognise the actual address. Simple enough to fix, just check url.indexOf('http') === 0 and if not, prepend 'http://' before it's parsed by node's internal url module.

This check would also pass for https, hence why I don't check for http://

mcollina commented 8 years ago

go ahead. We can default to http.