4

I'm using the new Volley http stack from Google in my actual Android project. Everything went fine till i got a hostname with underscore in it (this is the well known bug of the java.net.URL when it ignores the hosname) Is there any known workaround for this error? Or any other library which can process it?

The exception is the following:

com.android.volley.NoConnectionError: java.net.UnknownHostException

Thanks for advance!

Cheers, Gabor

hamutarto
  • 83
  • 6
  • Try dropping in OkHTTP and using it as the underlying engine for Volley (https://plus.google.com/108284392618554783657/posts/eJJxhkTQ4yU) and see if OkHTTP has fixed this. – CommonsWare Jul 08 '13 at 14:17
  • unfortunately it did not solved. the same problem exist, because the OkHTTPStack used java.net.URL. com.android.volley.NoConnectionError: java.net.UnknownHostException Caused by: java.net.UnknownHostException – hamutarto Jul 09 '13 at 07:53
  • have you tried using URLEncoder to encode the hostname where bad characters may exist? – kandroidj Nov 17 '15 at 20:26

0 Answers0