update 2024-03-09 16:11:23

This commit is contained in:
github-actions[bot] 2024-03-09 16:11:23 +08:00
parent 58ffec5bf3
commit 81c657b9c4
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ function connect_status()
local e = {}
e.use_time = ""
local url = luci.http.formvalue("url")
local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -I -skL -w "%{http_code}:%{time_starttransfer}" ' .. url)
local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -i -sk -w "%{http_code}:%{time_starttransfer}" ' .. url)
local code = tonumber(luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $1}'") or "0")
if code ~= 0 then
local use_time = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'")