Json api-> iphone, enable gzip?
-
Hey, thanks for the great api π
I am having bit of an issue in that I want to optimise the downloading so gzip would be great.
But for some reason when I make requests via the iphone (tested on both iOS 6/7) I don’t get gzip content back.
this is the header for the request:
GET /?json=get_recent/posts&count=10 HTTP/1.1
Host: snowbrains.com
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us
Connection: keep-alive
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B141 Safari/8536.25response:
HTTP/1.1 200 OK
Date: Sat, 30 Nov 2013 10:47:48 GMT
Server: Apache
X-Pingback: http://snowbrains.com/xmlrpc.php
Vary: User-Agent
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8but when I run the same query via safari with fake user-agent on os x I get instead:
GET /?json=get_recent_posts&count=10&dev=1 HTTP/1.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9) AppleWebKit/537.71 (KHTML, like Gecko) Version/7.0 Safari/537.71
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-aliveand response :
HTTP/1.1 200 OK
Date: Sat, 30 Nov 2013 10:49:21 GMT
Server: Apache
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=5, max=96
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain; charset: UTF-8I know I can get gzip content as when I use the jetpack json api calls I always get back gzip content.
Anyone who can help me figure this out please?
The topic ‘Json api-> iphone, enable gzip?’ is closed to new replies.