]> granicus.if.org Git - curl/commitdiff
brotli: allow compiling with version 0.6.0.
authorPatrick Monnerat <patrick@monnerat.net>
Wed, 20 Dec 2017 14:30:35 +0000 (15:30 +0100)
committerPatrick Monnerat <patrick@monnerat.net>
Wed, 20 Dec 2017 14:30:35 +0000 (15:30 +0100)
Some error codes were not yet defined in brotli 0.6.0: do not issue code
for them in this case.

lib/content_encoding.c

index 3d061375c57d0b3b8268f23e31e364e8fe335b10..c2ba2697201c0a57c7c436db4e8e0087506c5354 100644 (file)
@@ -546,8 +546,12 @@ 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
   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: