The user inputs their website details in the settings page and clicks save, then the app gets a specific file from their website and the data gets loaded into the app. However if they have a website that has https:// I get the SSLException error message javax.net.ssl.SSLException: hostname in certificate didn't match www.userswebsite.com My code I have to read the file is as follows:
HttpClient httpclient = new DefaultHttpClient();
// get url data
HttpPost httppost = new HttpPost(weburi);
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
webs = entity.getContent();
//I then go on to read file into array and use data in a runnable...
final BufferedReader reader = new BufferedReader( new InputStreamReader(webs, "iso-8859-1"), 8);
I have no control over the users website as it will be thier website that they will be using to store the data on and I extract it from them. When I type the URL in a browser on windows I get no errors.