]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
content_encoding: drop a guard for brotli 1.0.0+ macro
authorViktor Szakats <commit@vsz.me>
Mon, 24 Nov 2025 18:38:34 +0000 (19:38 +0100)
committerViktor Szakats <commit@vsz.me>
Mon, 24 Nov 2025 21:33:22 +0000 (22:33 +0100)
Also add comment with version requirement for the other guard.

Refs:
https://github.com/google/brotli/commit/19d86fb9a60aa7034d4981b69a5b656f5b90017e
https://github.com/google/brotli/commit/03739d2b113afe60638069c4e1604dc2ac27380d

Ref: #19672
Follow-up to e639d4ca4d794c222dde4680d9ff35053f501042
Closes #19673

lib/content_encoding.c

index b724b576b41d774a9f6f216cc67394e21d02bf1c..f128f7565f7744a5df89221682f959e3fd9e761f 100644 (file)
@@ -384,12 +384,10 @@ static CURLcode brotli_map_error(BrotliDecoderErrorCode be)
   case BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:
   case BROTLI_DECODER_ERROR_FORMAT_PADDING_1:
   case BROTLI_DECODER_ERROR_FORMAT_PADDING_2:
-#ifdef BROTLI_DECODER_ERROR_COMPOUND_DICTIONARY
+#ifdef BROTLI_DECODER_ERROR_COMPOUND_DICTIONARY  /* brotli v1.1.0+ */
   case BROTLI_DECODER_ERROR_COMPOUND_DICTIONARY:
 #endif
-#ifdef BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET
   case BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:
-#endif
   case BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:
     return CURLE_BAD_CONTENT_ENCODING;
   case BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: