added case insensitivity

This commit is contained in:
Emma Tebibyte 2022-09-02 15:21:50 -04:00
parent 558401fa3b
commit 586088dda4

View File

@ -2,7 +2,7 @@
echo "Determining MIME type of $1:"
MIME=$(curl -I -s "$1" | sed -n -e 's/^content-type: //p' | sed -e 's/;.\+//g' | tr -d '\r')
MIME=$(curl -I -s "$1" | sed -n -e 's/^[cC]ontent-[tT]ype: //p' | sed -e 's/;.\+//g' | tr -d '\r')
echo $MIME