Browse Source

更新HttpUtils中的User-Agent

pull/481/head
coderwu 11 months ago
parent
commit
f84b77993c
  1. 2
      ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java

2
ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java

@ -74,7 +74,7 @@ public class HttpUtils
URLConnection connection = realUrl.openConnection(); URLConnection connection = realUrl.openConnection();
connection.setRequestProperty("accept", "*/*"); connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); connection.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)");
connection.connect(); connection.connect();
in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType)); in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType));
String line; String line;

Loading…
Cancel
Save