更新
This commit is contained in:
parent
982c7cb71e
commit
85b047e938
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user