summaryrefslogtreecommitdiff
path: root/docs/INTERNALS.md
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 /docs/INTERNALS.md
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 'docs/INTERNALS.md')
-rw-r--r--docs/INTERNALS.md21
1 files changed, 11 insertions, 10 deletions
diff --git a/docs/INTERNALS.md b/docs/INTERNALS.md
index fb9d50378..1a4350e27 100644
--- a/docs/INTERNALS.md
+++ b/docs/INTERNALS.md
@@ -644,9 +644,9 @@ Content Encoding
[HTTP/1.1][4] specifies that a client may request that a server encode its
response. This is usually used to compress a response using one (or more)
encodings from a set of commonly available compression techniques. These
- schemes include 'deflate' (the zlib algorithm), 'gzip' and 'compress'. A
- client requests that the server perform an encoding by including an
- Accept-Encoding header in the request document. The value of the header
+ schemes include 'deflate' (the zlib algorithm), 'gzip' 'br' (brotli) and
+ 'compress'. A client requests that the server perform an encoding by including
+ an Accept-Encoding header in the request document. The value of the header
should be one of the recognized tokens 'deflate', ... (there's a way to
register new schemes/tokens, see sec 3.5 of the spec). A server MAY honor
the client's encoding request. When a response is encoded, the server
@@ -661,9 +661,10 @@ Content Encoding
## Supported content encodings
- The 'deflate' and 'gzip' content encodings are supported by libcurl. Both
- regular and chunked transfers work fine. The zlib library is required for
- this feature.
+ The 'deflate', 'gzip' and 'br' content encodings are supported by libcurl.
+ Both regular and chunked transfers work fine. The zlib library is required
+ for the 'deflate' and 'gzip' encodings, while the brotli decoding library is
+ for the 'br' encoding.
## The libcurl interface
@@ -674,10 +675,10 @@ Content Encoding
where string is the intended value of the Accept-Encoding header.
Currently, libcurl does support multiple encodings but only
- understands how to process responses that use the "deflate" or "gzip"
- Content-Encoding, so the only values for [`CURLOPT_ACCEPT_ENCODING`][5]
- that will work (besides "identity," which does nothing) are "deflate"
- and "gzip". If a response is encoded using the "compress" or methods,
+ understands how to process responses that use the "deflate", "gzip" and/or
+ "br" content encodings, so the only values for [`CURLOPT_ACCEPT_ENCODING`][5]
+ that will work (besides "identity," which does nothing) are "deflate",
+ "gzip" and "br". If a response is encoded using the "compress" or methods,
libcurl will return an error indicating that the response could
not be decoded. If <string> is NULL no Accept-Encoding header is generated.
If <string> is a zero-length string, then an Accept-Encoding header