X-Git-Url: http://git.plutz.net/?p=cgilite;a=blobdiff_plain;f=static.sh;h=bf109ed26959e708d6d675ba57d38e829da517da;hp=56d3a25e1a93dc1d2173d9f168ced79bf51ac750;hb=1a1d111199b770c092e1b16a7e03568d3d911b79;hpb=d4e1d709a6710c2a4941d34cce58d2cfc5dea782 diff --git a/static.sh b/static.sh index 56d3a25..bf109ed 100755 --- a/static.sh +++ b/static.sh @@ -35,7 +35,7 @@ if printf '%s' "${HTTP_RANGE}" |grep -qE '^bytes=[0-9]+-[0-9]*\r?$'; then _bend="${_range#*-}" fi -if [ -x "$file" -o \! -r "$file" -o \! -f "$file" ]; then +if ! [ -f "$file" ] || [ -x "$file" ] || ! grep -qm1 '' "$file" ; then printf 'Status:403 Forbidden\r\n\r\n' elif [ "$date" = "$cachedate" ]; then printf 'Status:304 Not Modified\r\n'