jade
789b19a0cf
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:
|
||
---|---|---|
.. | ||
data | ||
canon-path.cc | ||
checked-arithmetic.cc | ||
chunked-vector.cc | ||
closure.cc | ||
compression.cc | ||
config.cc | ||
escape-string.cc | ||
fmt.cc | ||
generator.cc | ||
git.cc | ||
hash.cc | ||
hilite.cc | ||
json-utils.cc | ||
logging.cc | ||
lru-cache.cc | ||
paths-setting.cc | ||
pool.cc | ||
references.cc | ||
serialise.cc | ||
shlex.cc | ||
suggestions.cc | ||
tests.cc | ||
url-name.cc | ||
url.cc | ||
xml-writer.cc |