How can I find out if Heroku is sending gzip answers?

I am making an iPhone application that requests JSON from Heroku.

  • Am I getting a gzip response? And, does the iPhone automatically unzip gzip answers, or do you need to program this? I use NSURLConnectionasynchronously (with the delegate protocol) as described in the Xcode docs.

    When I do this:

    curl -I http://acani.heroku.com/users/4c96ee4f1467281352000049/1234/50/50
    

    I get:

    HTTP/1.1 200 OK
    Server: nginx/0.7.67
    Date: Sun, 17 Oct 2010 16:27:25 GMT
    Content-Type: application/json
    Connection: keep-alive
    Content-Length: 11532
    X-Varnish: 2314841869
    Age: 0
    Via: 1.1 varnish
    
  • I also use Zimt WebSocket code with AsyncSocket for chat. Chat Server - Node.js. Do I gzipping every chat message? Or is this done automatically?

  • Interestingly, to reduce bandwidth, gzip your tweets on Twitter (using JavaScript on the Internet or Objective-C on iPhone) before they are sent to Twitter?

Thank!

Matt

+3
1

, , Content-Encoding. gzip, compress, deflate. . RFC 2616. 3.5 .

+2

Source: https://habr.com/ru/post/1769991/


All Articles