Negeer HTTP 302
This commit is contained in:
parent
0a6dbe5df3
commit
2299b092ad
|
@ -26,7 +26,9 @@ if [ -d ./public ]; then
|
||||||
if [ -f ./check-all-links.tmp ]; then
|
if [ -f ./check-all-links.tmp ]; then
|
||||||
for URL in $(cat ./check-all-links.tmp); do
|
for URL in $(cat ./check-all-links.tmp); do
|
||||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "${URL}")
|
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "${URL}")
|
||||||
if [ ! "${HTTP_CODE}" = "200" ]; then
|
# 200 = OK
|
||||||
|
# 302 = Tijdelijke redirect, bijvoorbeeld als authenticatie nodig is (GitHub)
|
||||||
|
if [ ! "${HTTP_CODE}" = "200" -a ! "${HTTP_CODE}" = "302" ]; then
|
||||||
echo "[WARNING] ${URL} (HTTP: ${HTTP_CODE})"
|
echo "[WARNING] ${URL} (HTTP: ${HTTP_CODE})"
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
Reference in a new issue