summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2017-11-05 15:28:16 +0100
committerPatrick Monnerat <patrick@monnerat.net>2017-11-05 15:28:16 +0100
commit11bf1796cd015373a996e6eb26212e2e1aadb066 (patch)
tree1b63178f15c501be24d33e81f3b57bb7cd163b92 /include
parentdbcced8e32b50c068ac297106f0502ee200a1ebd (diff)
downloadcurl-11bf1796cd015373a996e6eb26212e2e1aadb066.tar.gz
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.
Diffstat (limited to 'include')
-rw-r--r--include/curl/curl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 7139a3311..764cbc703 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -2592,6 +2592,7 @@ typedef enum {
CURLVERSION_SECOND,
CURLVERSION_THIRD,
CURLVERSION_FOURTH,
+ CURLVERSION_FIFTH,
CURLVERSION_LAST /* never actually use this */
} CURLversion;
@@ -2600,7 +2601,7 @@ typedef enum {
meant to be a built-in version number for what kind of struct the caller
expects. If the struct ever changes, we redefine the NOW to another enum
from above. */
-#define CURLVERSION_NOW CURLVERSION_FOURTH
+#define CURLVERSION_NOW CURLVERSION_FIFTH
typedef struct {
CURLversion age; /* age of the returned struct */
@@ -2628,6 +2629,12 @@ typedef struct {
const char *libssh_version; /* human readable string */
+ /* These fields were added in CURLVERSION_FIFTH */
+
+ unsigned int brotli_ver_num; /* Numeric Brotli version
+ (MAJOR << 24) | (MINOR << 12) | PATCH */
+ const char *brotli_version; /* human readable string. */
+
} curl_version_info_data;
#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */
@@ -2658,6 +2665,7 @@ typedef struct {
for cookie domain verification */
#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */
#define CURL_VERSION_MULTI_SSL (1<<22) /* Multiple SSL backends available */
+#define CURL_VERSION_BROTLI (1<<23) /* Brotli features are present. */
/*
* NAME curl_version_info()