Request builder creates a request with an invalid URL if the host contains the ellipsis character (…)
oakkitten opened this issue · comments
oakkitten commented
I hope I don't need to create a test case since the issue is very simple. This throws IllegalArgumentException
, as it should:
new Request.Builder().url("http://.../");
while this doesn't:
new Request.Builder().url("http://…/");
and the following expression is true
:
new Request.Builder().url("http://…/").url.toString().equals("http://.../")
OkHttp seems to be right to convert …
to ...
, but I think request builder should throw an exception if passed an invalid URL such as "http://…/"
, as the resulting request can lead to a dispatcher crash later on.