Created
October 23, 2019 15:25
-
-
Save kibotu/58183363af9aedd378f514f0efc1b1b0 to your computer and use it in GitHub Desktop.
gzip test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL=$1 | |
PLAIN="$(curl $URL --silent --write-out "%{size_download}\n" --output /dev/null)" | |
GZIPPED="$(curl $URL --silent -H "Accept-Encoding: gzip,deflate" --write-out "%{size_download}\n" --output /dev/null)" | |
if test $PLAIN -gt $GZIPPED | |
then echo "supported" | |
else echo "unsupported" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
./gzip_test.sh https://exozet-dev.europapark.de/api/v1/ping