Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compressed responses #68

Closed
carueda opened this issue Jan 9, 2019 · 2 comments
Closed

Compressed responses #68

carueda opened this issue Jan 9, 2019 · 2 comments

Comments

@carueda
Copy link
Member

carueda commented Jan 9, 2019

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.

@carueda
Copy link
Member Author

carueda commented Jan 15, 2019

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)

@carueda
Copy link
Member Author

carueda commented Jan 16, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant