mmisw/orr-ont

Compressed responses

Closed this issue · 2 comments

That is, basically support Accept-Encoding:gzip .

The short-term solution would be to use a more recent scalatra version that provides this feature, see http://scalatra.org/guides/2.6/http/gzip.html.

However, per #47 , a longer-term solution is to use the relevant feature when migrating to a more active web toolkit in general.

As noted in the changelog, Actually scalatra 2.3.0 does seem to support gzip
http://scalatra.org//guides/2.3/http/gzip.html
(btw, upgrading scalatra will certainly require significant effort;
I just gave it a quick try and many compile errors arise)

The new ORR version including this is 3.8.1, which I've enabled for the COR instance.

A basic verification using HTTPie:

$ http -h get http://sweetontology.net/stateTimeGeologic.ttl Accept-Encoding:gzip
HTTP/1.1 200
Access-Control-Allow-Origin: *
Connection: Keep-Alive
Content-Encoding: gzip
Content-Type: text/turtle;charset=UTF-8
Date: Wed, 16 Jan 2019 05:29:06 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.37 (Amazon)
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
X-XSS-Protection: 1; mode=block