we made some minor updates in response for API, and we see some APPs are broken for now, for unknown reason. Changes made:
- removed pretty print responses. Now responses are without whitespaces (still valid xml, save 50% of data in some cases). Example https://api.opensubtitles.org/xml-rpc (check the source - it is "all together")
- compression deflate is preferred now (slightly better compression ratio than gzip)
- API is served through CloudFlare. Some clients doesn't support accept-encoding gzip/deflate and CF is doing great job here.
- some X- http headers was added for internal logging
So far problematic clients:
VLSub - https://github.com/exebetche/vlsub/issues/143 - temporary workaround possible, problem is Transfer-Encoding: chunked
SolEol - unknown reason (can accept just pretty print xml-rpc?)
some technical stuff:
HTTP request WITHOUT ACCEPT_ENCODING:
Current (new) http header response looks like this (using cloudflare)
Code: Select all
< HTTP/1.1 200 OK
< Date: Thu, 27 Oct 2016 18:51:31 GMT
< Content-Type: text/xml;charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: __cfduid=d7066c70fe9dde24cac3c4e20e01a1b9f1477594290; expires=Fri, 27-Oct-17 18:51:30 GMT; path=/; domain=.opensubtitles.org; HttpOnly
< Set-Cookie: PHPSESSID=e6g89l8lqdbbdm0lu7j20aut7; path=/; domain=.opensubtitles.org; HttpOnly
< X-Content-Encoding: gzip
< X-Uncompressed-Content-Length: 386
< X-Compressed-Content-Length: 205
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, POST, OPTIONS
< Access-Control-Allow-Headers: Origin,X-Requested-With,Content-Type,Accept,DNT,Keep-Alive,User-Agent,If-Modified-Since,Cache-Control
< X-Cache-Backend: web2
< Vary: Accept-Encoding
< Age: 0
< X-Cache: MISS
< Server: cloudflare-nginx
< CF-RAY: 2f8856fd43fd03b8-SIN
Code: Select all
< Set-Cookie: PHPSESSID=e6g89l8lqdbbdm0lu7j20aut7; path=/; domain=.opensubtitles.org; HttpOnly
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, POST, OPTIONS
< Access-Control-Allow-Headers: Origin,X-Requested-With,Content-Type,Accept,DNT,Keep-Alive,User-Agent,If-Modified-Since,Cache-Control
< Content-type: text/xml;charset=UTF-8
< Content-Length: 386
< Date: Thu, 27 Oct 2016 18:54:14 GMT
< X-Cache-Backend: web3
< Age: 0
< X-Cache: MISS
< Accept-Ranges: bytes
< Connection: keep-alive
New header looks like this:
Code: Select all
< Date: Thu, 27 Oct 2016 19:00:14 GMT
< Content-Type: text/xml;charset=UTF-8
< Content-Length: 205
< Connection: keep-alive
< Set-Cookie: __cfduid=d3b1fcb018704e3f00dc9f2af131d6e0e1477594810; expires=Fri, 27-Oct-17 19:00:10 GMT; path=/; domain=.opensubtitles.org; HttpOnly
< Set-Cookie: PHPSESSID=e6g89l8lqdbbdm0lu7j20aut7; path=/; domain=.opensubtitles.org; HttpOnly
< Content-Encoding: gzip
< X-Content-Encoding: gzip
< X-Uncompressed-Content-Length: 386
< X-Compressed-Content-Length: 205
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, POST, OPTIONS
< Access-Control-Allow-Headers: Origin,X-Requested-With,Content-Type,Accept,DNT,Keep-Alive,User-Agent,If-Modified-Since,Cache-Control
< X-Cache-Backend: web3
< Vary: Accept-Encoding
< Age: 0
< X-Cache: MISS
< Accept-Ranges: bytes
< Server: cloudflare-nginx
< CF-RAY: 2f8863af96b91123-SIN
Code: Select all
< Set-Cookie: PHPSESSID=e6g89l8lqdbbdm0lu7j20aut7; path=/; domain=.opensubtitles.org; HttpOnly
< Content-Encoding: gzip
< X-Content-Encoding: gzip
< X-Uncompressed-Content-Length: 386
< X-Compressed-Content-Length: 205
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, POST, OPTIONS
< Access-Control-Allow-Headers: Origin,X-Requested-With,Content-Type,Accept,DNT,Keep-Alive,User-Agent,If-Modified-Since,Cache-Control
< Content-type: text/xml;charset=UTF-8
< Content-Length: 205
< Date: Thu, 27 Oct 2016 18:57:15 GMT
< X-Cache-Backend: web2
< Vary: Accept-Encoding
< Age: 0
< X-Cache: MISS
< Accept-Ranges: bytes
< Connection: keep-alive