Skip to content

Instantly share code, notes, and snippets.

@kibotu
Created October 23, 2019 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kibotu/58183363af9aedd378f514f0efc1b1b0 to your computer and use it in GitHub Desktop.
Save kibotu/58183363af9aedd378f514f0efc1b1b0 to your computer and use it in GitHub Desktop.
gzip test
#!/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
@kibotu
Copy link
Author

kibotu commented Oct 23, 2019

./gzip_test.sh https://exozet-dev.europapark.de/api/v1/ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment