This commit is contained in:
sjm 2023-12-28 16:00:17 +08:00
parent 982c7cb71e
commit 85b047e938

View File

@ -163,16 +163,18 @@ public class UrlListController {
public String urlcheck(String url) throws MalformedURLException, URISyntaxException {
HashMap<String,Object> hashMap = new HashMap<>();
if(urlCheckUtil.CheckHttp(url)){
String x = urlCheckUtil.checkUrlConnection(url);
if(x.equals("404")){
hashMap.put("code",x);
String valid = urlCheckUtil.checkUrlConnection(url);
String speed = urlCheckUtil.url_speed(url);
if(valid.equals("404")){
hashMap.put("code",valid);
hashMap.put("msg", "https");
hashMap.put("speed", 0);
}else{
hashMap.put("code",x);
hashMap.put("code",valid);
hashMap.put("msg", "https");
hashMap.put("speed", speed);
}
return JSON.toJSONString(hashMap);
// urlCheckUtil.url_speed(url);
}else{
hashMap.put("msg", "http");
return JSON.toJSONString(hashMap);