Add log in case of error

This commit is contained in:
Laurent Clouet
2015-02-04 22:25:51 +00:00
parent e6c25a710d
commit 2c20507b09

View File

@@ -516,6 +516,7 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
InputStream inStrm = httpCon.getInputStream(); InputStream inStrm = httpCon.getInputStream();
if (httpCon.getResponseCode() != HttpURLConnection.HTTP_OK) { if (httpCon.getResponseCode() != HttpURLConnection.HTTP_OK) {
this.log.error("Server::HTTPGetFile(" + url_ + ", ...) HTTP code is not " + HttpURLConnection.HTTP_OK + " it's " + httpCon.getResponseCode());
return -1; return -1;
} }
int size = httpCon.getContentLength(); int size = httpCon.getContentLength();