hi,
silly question probably but i cant find the answer.
a server tries to redirect me to a url with spaces and java doesnt encode the redirected url properly (the second request fails and code 400 is returned)
code like that:
URL url = new URL(urlString);
url.openStream();
on last line IOException is thrown
the communication looks like this
the request is sent from java, the server first replies with HTTP code 302, and returns URL that has empty spaces in the file name part. this is sent as-is back from java in next request and causes server to return HTTP code 400 and java fails with IOException...
as far as i could see other HTTP clients like mozilla or wget encode properly the spaces to %20 in the redirected url (and manage to get the data from redirected url).
what am i doing wrong? please point me to some docs or api pages
thanks & regards
peter
the url, just in case...
http://www.lightclan.nl/index.php?SubID=1079&View=283