|
@@ -61,6 +61,8 @@ public class HttpUtils
|
|
|
connection.setRequestProperty("accept", "*/*");
|
|
|
connection.setRequestProperty("connection", "Keep-Alive");
|
|
|
connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
|
|
|
+ connection.setConnectTimeout(10000);
|
|
|
+ connection.setReadTimeout(10000);
|
|
|
connection.connect();
|
|
|
in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
|
|
log.info("read success url- {}", realUrl);
|