Hi Christian,

thx for your reply. Got it :)
Solution 2 would be cool - maybe feature request?

But I can live with a workaround.

kind regards,

Stefan


-----Ursprüngliche Nachricht-----
Von: Christian Grün [mailto:christian.gruen@gmail.com]
Gesendet: Donnerstag, 3. Oktober 2019 11:51
An: Stefan Koch <koch@buit-solutions.com>
Cc: BaseX <basex-talk@mailman.uni-konstanz.de>
Betreff: Re: [basex-talk] HTTPServer + gzip compression


Hi Stefan,

There’s a StackOverflow entry that has previously been referenced on
this list (by Michael Seiferle, see [2]). Based on this thread, in
which Joakim Erdfelt (the magnificent Jetty core developer) explains
why the existing approaches for enabling GZIP compression don’t work
anymore, I see three choices:

1. to wrap all HTTP responses in a GZIP output stream;
2. to initialize GZipHandler in our basexhttp code; or
3. enable GZIP compression outside BaseX,

Alternative 1 would give us most control, but it would raise new
questions that would need to be solved. Alternative 2 may be the
better approach: It only works if basexhttp is used, but we could
benefit from existing optimizations and tweaks from the Jetty
implementation [2]. Alternative 3 is already available: You can use
another light-weight web server as proxy (caddy, nginx), or you can
start Jetty as described by Joakim.

> Good idea to ask the Jetty devs - I'll try that.

Thanks; feel free to keep us updated,
Christian

[1] https://stackoverflow.com/questions/38635262/jetty-9-and-gziphandler
[2] https://www.eclipse.org/jetty/documentation/current/gzip-filter.html