lix/tests/unit
jade 789b19a0cf util: fix brotli decompression of empty input
This caused an infinite loop before since it would just keep asking the
underlying source for more data.

In practice this happened because an HTTP server served a
response to a HEAD request (for which curl will not retrieve any body or
call our write callback function) with Content-Encoding: br, leading to
decompressing nothing at all and going into an infinite loop.

This adds a test to make sure none of our compression methods do that
again, as well as just patching the HTTP client to never feed empty data
into a compression algorithm (since they absolutely have the right to
throw CompressionError on unexpectedly-short streams!).

Reported on Matrix: https://matrix.to/#/!lymvtcwDJ7ZA9Npq:lix.systems/$8BWQR_zKxCQDJ40C5NnDo4bQPId3pZ_aoDj2ANP7Itc?via=lix.systems&via=matrix.org&via=tchncs.de

Change-Id: I027566e280f0f569fdb8df40e5ecbf46c211dad1
2024-09-18 15:37:29 -07:00
..
libcmd util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
libexpr libexpr: Deprecate URL literals 2024-08-17 20:31:57 +02:00
libexpr-support/tests libexpr: Introduce Deprecated features 2024-08-17 19:47:51 +02:00
libmain tree-wide: unify progress bar inactive and paused states 2024-07-01 18:19:34 +02:00
libstore tree-wide: shuffle headers around for about 30s compile time 2024-08-28 09:55:05 -07:00
libstore-support/tests Test including relative paths in configuration 2024-09-01 15:52:48 -07:00
libutil util: fix brotli decompression of empty input 2024-09-18 15:37:29 -07:00
libutil-support/tests Test including relative paths in configuration 2024-09-01 15:52:48 -07:00
meson.build Test including relative paths in configuration 2024-09-01 15:52:48 -07:00