OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.16k stars 599 forks source link

Documentation unclear: compression #30295

Open bmarwell opened 6 days ago

bmarwell commented 6 days ago

Hi,

I have a few issues with the compression documentation.

It was outlined here: https://openliberty.io/blog/2020/04/22/http-response-compression.html The actual docs I am referring to: https://openliberty.io/docs/latest/reference/config/compression.html

Here are some enhancements I would like to suggest:

Compression algorithm

currently, we have support for:

Update wish / recommendation

Future perspective: brotli, lz4 and zstd

Modern browsers will send: Accept-Encoding: gzip, deflate, br, zstd (Firefox, Edge, others).

Please document the small overlap and maybe reference wishlist issues / github RFE issues for br (brotli) and zstd (and maybe lz4).

serverPreferredAlgorithm

This is an attribute, interestingly. Make that information stand out, maybe add an example. Usually server.xml uses tags only, so this is somewhat unexpected.

Luckily, <config onError="fail" /> will make the startup fail.

types

Invalid tags won't fail the start

<config onError="fail" /> will NOT make the startup fail if you accidentally use <type> instead of <types>. Please mention this explicitly (and why it DOES fail for <serverPreferredAlgorithm>, see above section).

Give examples of configurations

Give an example snipped for the default configuration

combination of no prefix, + and -

What happens if you combine those?

<compression>
  <types>text/plain</types>
  <types>+text/*</types>
  <types>-text/xml</types>
</compression>

What would be the outcome? What takes precedence? What about other combinations?

minGzipSize

This option is not documented


Thanks!

bmarwell commented 6 days ago

Oh, and by the way, could a user extension extend the list of algorithms?