I have an urgent ugly problem. I have a php file on a server that reads the name of the files of a directory from the server and POST them to my java application. When I try to read it, i get
Server returned HTTP response code: 400 for URL: http://www.xxxxxxxxxxxxx
. This does not happens on files that do not contain white spaces. Only at URLs like: "http://www.abc.com/Hello world.gif" but not at "http://www.abc.com/HelloWorld.gif".
I tried to encode the URL... I could not solve it. Please can you help me? I need it fast...