mirror of
https://github.com/dockur/windows.git
synced 2026-05-06 14:41:24 +00:00
build: Log HTTP response codes
Added HTTP response code logging in the check function.
This commit is contained in:
parent
d8e51d8965
commit
6e104b2cf7
1 changed files with 2 additions and 0 deletions
2
.github/workflows/links.yml
vendored
2
.github/workflows/links.yml
vendored
|
|
@ -31,8 +31,10 @@ jobs:
|
||||||
check() {
|
check() {
|
||||||
local url="$1" http
|
local url="$1" http
|
||||||
http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000"
|
http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000"
|
||||||
|
printf '%s\n' "HTTP: $http"
|
||||||
[[ "$http" == 2* ]] && return 0
|
[[ "$http" == 2* ]] && return 0
|
||||||
http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
|
http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
|
||||||
|
printf '%s\n' "HTTP: $http"
|
||||||
[[ "$http" == 2* ]]
|
[[ "$http" == 2* ]]
|
||||||
}
|
}
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue