Commit 147723ee authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget fix: use precise regex to match HTTP status line in check functions

parent 66b568c5
......@@ -1412,13 +1412,13 @@ url_get_headers()
url_check_accessible()
{
local URL="$1"
url_get_response "$URL" | grep "HTTP/" | tail -n1 | grep -q -w "200\|404"
url_get_response "$URL" | grep "HTTP/[0-9]\.[0-9] [0-9]" | tail -n1 | grep -q -w "200\|404"
}
url_check_available()
{
local URL="$1"
url_get_response "$URL" | grep "HTTP/" | tail -n1 | grep -q -w "200"
url_get_response "$URL" | grep "HTTP/[0-9]\.[0-9] [0-9]" | tail -n1 | grep -q -w "200"
}
url_get_header()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment