From 11bf1796cd015373a996e6eb26212e2e1aadb066 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Sun, 5 Nov 2017 15:28:16 +0100 Subject: HTTP: implement Brotli content encoding This uses the brotli external library (https://github.com/google/brotli). Brotli becomes a feature: additional curl_version_info() bit and structure fields are provided for it and CURLVERSION_NOW bumped. Tests 314 and 315 check Brotli content unencoding with correct and erroneous data. Some tests are updated to accomodate with the now configuration dependent parameters of the Accept-Encoding header. --- tests/runtests.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/runtests.pl') diff --git a/tests/runtests.pl b/tests/runtests.pl index 7f6f81291..dcd9f8419 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -217,6 +217,7 @@ my $gopher_ipv6; # set if Gopher server has IPv6 support my $has_ipv6; # set if libcurl is built with IPv6 support my $has_unix; # set if libcurl is built with Unix sockets support my $has_libz; # set if libcurl is built with libz support +my $has_brotli; # set if libcurl is built with brotli support my $has_getrlimit; # set if system has getrlimit() my $has_ntlm; # set if libcurl is built with NTLM support my $has_ntlm_wb; # set if libcurl is built with NTLM delegation to winbind @@ -2880,6 +2881,9 @@ sub checksystem { if($feat =~ /libz/i) { $has_libz = 1; } + if($feat =~ /brotli/i) { + $has_brotli = 1; + } if($feat =~ /NTLM/i) { # NTLM enabled $has_ntlm=1; @@ -3396,6 +3400,11 @@ sub singletest { next; } } + elsif($1 eq "brotli") { + if($has_brotli) { + next; + } + } elsif($1 eq "NTLM") { if($has_ntlm) { next; @@ -3552,6 +3561,11 @@ sub singletest { next; } } + elsif($1 eq "brotli") { + if(!$has_brotli) { + next; + } + } elsif($1 eq "NTLM") { if(!$has_ntlm) { next; -- cgit v1.2.3