diff --git a/xdg-sanity.sh b/xdg-sanity.sh index 96c02f0..cb8ad36 100755 --- a/xdg-sanity.sh +++ b/xdg-sanity.sh @@ -2,12 +2,14 @@ echo "Determining MIME type of $1:" -MIME=$(curl -I -s "$1" | sed -n -e 's/^content-type: //p' | tr -d '\r') +MIME=$(curl -I -s "$1" | sed -n -e 's/^content-type: //p' | sed -n -e 's/;.\+//p' | tr -d '\r') echo $MIME -BROWSER=$(cat /etc/xdg-sanity.conf | sed -n -e 's/^browser = //p') +BROWSER=$(cat /etc/xdg-sanity.conf | sed -n -e 's/^browser = //p' ) +# add application/x-xpinstall text/xml application/xhtml+xml x-scheme-handler/https handling +# fix text/html; charset=utf-8 handling if [ "$MIME" = "text/html" ] then $BROWSER $1