HttpURLConnection request being hit twice to the server for downloading file
问题 Following is my android code for downloading file from sever. private String executeMultipart_download(String uri, String filepath) throws SocketTimeoutException, IOException { int count; System.setProperty("http.keepAlive", "false"); // uri="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTzoeDGx78aM1InBnPLNb1209jyc2Ck0cRG9x113SalI9FsPiMXyrts4fdU"; URL url = new URL(uri); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.connect(); int lenghtOfFile =