更新
This commit is contained in:
parent
982c7cb71e
commit
85b047e938
@ -163,16 +163,18 @@ public class UrlListController {
|
|||||||
public String urlcheck(String url) throws MalformedURLException, URISyntaxException {
|
public String urlcheck(String url) throws MalformedURLException, URISyntaxException {
|
||||||
HashMap<String,Object> hashMap = new HashMap<>();
|
HashMap<String,Object> hashMap = new HashMap<>();
|
||||||
if(urlCheckUtil.CheckHttp(url)){
|
if(urlCheckUtil.CheckHttp(url)){
|
||||||
String x = urlCheckUtil.checkUrlConnection(url);
|
String valid = urlCheckUtil.checkUrlConnection(url);
|
||||||
if(x.equals("404")){
|
String speed = urlCheckUtil.url_speed(url);
|
||||||
hashMap.put("code",x);
|
if(valid.equals("404")){
|
||||||
|
hashMap.put("code",valid);
|
||||||
hashMap.put("msg", "https");
|
hashMap.put("msg", "https");
|
||||||
|
hashMap.put("speed", 0);
|
||||||
}else{
|
}else{
|
||||||
hashMap.put("code",x);
|
hashMap.put("code",valid);
|
||||||
hashMap.put("msg", "https");
|
hashMap.put("msg", "https");
|
||||||
|
hashMap.put("speed", speed);
|
||||||
}
|
}
|
||||||
return JSON.toJSONString(hashMap);
|
return JSON.toJSONString(hashMap);
|
||||||
// urlCheckUtil.url_speed(url);
|
|
||||||
}else{
|
}else{
|
||||||
hashMap.put("msg", "http");
|
hashMap.put("msg", "http");
|
||||||
return JSON.toJSONString(hashMap);
|
return JSON.toJSONString(hashMap);
|
||||||
|
Loading…
Reference in New Issue
Block a user