Am 18/04/2024 um 11:16 schrieb Maximiliano Sandoval:
> Add support for compressing the body of responses with
> `Content-Encoding: deflate` following [RFC9110]. Note that in this
> context `deflate` is actually a "zlib" data format as defined in
> [RFC1950].
> 
> To preserve the current behavior we prefer `Content-Encoding: gzip`
> whenever `gzip` is listed as one of the encodings in the
> `Accept-Encoding` header and the data should be compressed.
> 
> [RFC9110] https://www.rfc-editor.org/rfc/rfc9110#name-deflate-coding
> [RFC1950] https://www.rfc-editor.org/rfc/rfc1950
> 
> Suggested-by: Lukas Wagner <l.wag...@proxmox.com>
> Tested-by: Folke Gleumes <f.gleu...@proxmox.com>
> Signed-off-by: Maximiliano Sandoval <m.sando...@proxmox.com>
> ---
> 
> Differences from v2:
>  - Remove redundant post-ifs
>  - Add Tested-by: Folke Gleumes trailer

thanks, but please add new trailers always to the bottom of the existing
trailer list.

> 
> Differences from v1:
>  - The commit documents the behavior better
>  - Add Suggested-by
>  - We set both gzip and deflate in the Accept-Encoding header if available
> 
>  src/PVE/APIServer/AnyEvent.pm | 28 ++++++++++++++++++++++------
>  1 file changed, 22 insertions(+), 6 deletions(-)
> 
>

applied, thanks!


While I applied this, I still got some questions:
- this uses the default compression level [0], was this chosen by default,
  did you test throughput of the various different levels, e.g. with some
  bigger API call to see if it would be worth it to go for a lower or higher
  level – doing a rough evaluation of this might still be good.

- you use the compression interface, not the deflate one, the former talks
  about RFC 1950 data streams, which often are using the deflate algorithm
  but, as per that RFC, do not necessarily have to.
  Why not use the deflate interface to ensure it's always using the correct
  algorithm?

[0]: https://metacpan.org/pod/Compress::Zlib#COMPRESS/UNCOMPRESS


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to