cURL Tip: Check that the Apache Compression (gzip, deflate) is Working - Comment Page: 1

This is a quick method with using cURL to check that Apache Compression with mod_gzip and mod_deflate is working. Only the remote server headers are needed. [inttf_post_ad1] Check that the Apache Compression is Working Get headers curl -I -H 'Accept-Encoding: gzip,deflate' http://www.if-not-true-then-false.com -I option which will make just HEAD request to server and get headers. -H option add header for accecpt content-encondig gzip and deflate. Check headers ### Working ### [...] Content-Encoding: gzip [...] ### Working ### [...] Content-Encoding: deflate [...] ### Not working ### [...] [...] If gzip or deflate found from headers then...

4 comments on “cURL Tip: Check that the Apache Compression (gzip, deflate) is Working - Comment Page: 1

    1. using GET from libwww-perl accomplishes the same:

      $ GET -Used -H ‘Accept-Encoding: gzip,deflate’ http://www.if-not-true-then-false.com
      GET http://www.if-not-true-then-false.com
      Accept-Encoding: gzip,deflate
      User-Agent: lwp-request/5.827 libwww-perl/5.833

      200 OK
      Connection: close
      Date: Fri, 21 Jun 2013 14:08:58 GMT
      Server: cloudflare-nginx
      Vary: Accept-Encoding
      Content-Encoding: gzip
      Content-Type: text/html; charset=UTF-8
      CF-RAY: 821461943d802fe
      Client-Date: Fri, 21 Jun 2013 14:08:58 GMT
      Client-Peer: 108.162.205.105:80
      Client-Response-Num: 1
      Client-Transfer-Encoding: chunked
      Set-Cookie: __cfduid=df093f70060aed36cb454e9167973aa341371823737; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.if-not-true-then-false.com
      X-CF-Powered-By: WP 1.3.9
      X-Pingback: http://www.if-not-true-then-false.com/xmlrpc.php
      X-Powered-By: PHP/5.4.16

      PS: your WP version seems a bit old, but I do not know anything about WP, just checked their site and as of 21 june 2013, the latest advertised is 3.5.1 and there is quite a big fat warning about the rest not being safe to use.

      Reply
      • Hi oxtan,

        Yes this is one method to get same info, thanks for sharing.

        Actually this WP 1.3.9 have nothing to do with WordPress version…it just CloudFlare plugin version. :)

        Reply
    2. With the generic cUrl, you have to write the string double quoted.
      “www.mywebsite.com”

      Reply
      • Sorry!
        Thanks for that!!

        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close