Replaced whitespaces by "%20" in urls on redirects and .connect(String
url)