Unless I'm missing something, the constructor should probably accept valid URLs. It seems to throw for `http://[::1]/`, but not `http://a:a/`.