]> git.proxmox.com Git - pve-http-server.git/commit
http: support Content-Encoding=deflate
authorMaximiliano Sandoval <m.sandoval@proxmox.com>
Thu, 18 Apr 2024 09:16:35 +0000 (11:16 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 18 Apr 2024 12:36:20 +0000 (14:36 +0200)
commit589c8c6cd43ccd55c5b4349263f608e39a34335f
tree1cde23f89deebb0fb4b01a82a4807a571a4f119f
parent5b4ce005cd922056b98dddbab3ba2983e6220aa4
http: support Content-Encoding=deflate

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.wagner@proxmox.com>
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Tested-by: Folke Gleumes <f.gleumes@proxmox.com>
src/PVE/APIServer/AnyEvent.pm