httpx 0.6.7 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -5
  3. data/doc/release_notes/0_0_1.md +7 -0
  4. data/doc/release_notes/0_0_2.md +9 -0
  5. data/doc/release_notes/0_0_3.md +9 -0
  6. data/doc/release_notes/0_0_4.md +7 -0
  7. data/doc/release_notes/0_0_5.md +5 -0
  8. data/doc/release_notes/0_1_0.md +9 -0
  9. data/doc/release_notes/0_2_0.md +5 -0
  10. data/doc/release_notes/0_2_1.md +16 -0
  11. data/doc/release_notes/0_3_0.md +12 -0
  12. data/doc/release_notes/0_3_1.md +6 -0
  13. data/doc/release_notes/0_4_0.md +51 -0
  14. data/doc/release_notes/0_4_1.md +3 -0
  15. data/doc/release_notes/0_5_0.md +15 -0
  16. data/doc/release_notes/0_5_1.md +14 -0
  17. data/doc/release_notes/0_6_0.md +5 -0
  18. data/doc/release_notes/0_6_1.md +6 -0
  19. data/doc/release_notes/0_6_2.md +6 -0
  20. data/doc/release_notes/0_6_3.md +13 -0
  21. data/doc/release_notes/0_6_4.md +21 -0
  22. data/doc/release_notes/0_6_5.md +22 -0
  23. data/doc/release_notes/0_6_6.md +19 -0
  24. data/doc/release_notes/0_6_7.md +5 -0
  25. data/doc/release_notes/0_7_0.md +46 -0
  26. data/doc/release_notes/0_8_0.md +27 -0
  27. data/doc/release_notes/0_8_1.md +8 -0
  28. data/doc/release_notes/0_8_2.md +7 -0
  29. data/doc/release_notes/0_9_0.md +38 -0
  30. data/lib/httpx/adapters/faraday.rb +2 -2
  31. data/lib/httpx/altsvc.rb +18 -2
  32. data/lib/httpx/chainable.rb +27 -9
  33. data/lib/httpx/connection.rb +215 -65
  34. data/lib/httpx/connection/http1.rb +54 -18
  35. data/lib/httpx/connection/http2.rb +100 -37
  36. data/lib/httpx/extensions.rb +2 -2
  37. data/lib/httpx/headers.rb +2 -2
  38. data/lib/httpx/io/ssl.rb +11 -3
  39. data/lib/httpx/io/tcp.rb +12 -2
  40. data/lib/httpx/loggable.rb +6 -6
  41. data/lib/httpx/options.rb +43 -28
  42. data/lib/httpx/plugins/authentication.rb +1 -1
  43. data/lib/httpx/plugins/compression.rb +28 -8
  44. data/lib/httpx/plugins/compression/gzip.rb +22 -12
  45. data/lib/httpx/plugins/cookies.rb +12 -8
  46. data/lib/httpx/plugins/digest_authentication.rb +2 -0
  47. data/lib/httpx/plugins/expect.rb +79 -0
  48. data/lib/httpx/plugins/follow_redirects.rb +1 -2
  49. data/lib/httpx/plugins/h2c.rb +0 -1
  50. data/lib/httpx/plugins/proxy.rb +23 -20
  51. data/lib/httpx/plugins/proxy/http.rb +9 -6
  52. data/lib/httpx/plugins/proxy/socks4.rb +1 -1
  53. data/lib/httpx/plugins/proxy/socks5.rb +5 -1
  54. data/lib/httpx/plugins/proxy/ssh.rb +0 -4
  55. data/lib/httpx/plugins/push_promise.rb +2 -2
  56. data/lib/httpx/plugins/retries.rb +32 -29
  57. data/lib/httpx/pool.rb +15 -10
  58. data/lib/httpx/registry.rb +2 -1
  59. data/lib/httpx/request.rb +8 -6
  60. data/lib/httpx/resolver.rb +7 -8
  61. data/lib/httpx/resolver/https.rb +15 -3
  62. data/lib/httpx/resolver/native.rb +22 -32
  63. data/lib/httpx/resolver/options.rb +2 -2
  64. data/lib/httpx/resolver/resolver_mixin.rb +1 -1
  65. data/lib/httpx/response.rb +17 -3
  66. data/lib/httpx/selector.rb +96 -95
  67. data/lib/httpx/session.rb +33 -34
  68. data/lib/httpx/timeout.rb +7 -1
  69. data/lib/httpx/version.rb +1 -1
  70. metadata +77 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '086c7a29b7788e44b3b1e84dff63b55443e0521e7939ba680ba9334690bb3d10'
4
- data.tar.gz: d8a69f563dfd7fe892e1227ad8aba6ae258b16a10b22545aa52e5127e6822ee0
3
+ metadata.gz: e15b3e81842118829ecc251093ce5e80ad0c82dada2c7b2588004b2bf7313f63
4
+ data.tar.gz: 9d4efcb47f0c269f2c5b9a3c950fe8069c3b76ffb2f9624b557d29a702704712
5
5
  SHA512:
6
- metadata.gz: 10ef2a61f98d0418eacef74e99f3d7cc3873bbd0f52ed1e312ea705df39eacb9cc943ceac30bc26b880f2faa05e9a5840706a311306616ae0cd417904e492b98
7
- data.tar.gz: 729b0ab97ae5e5a4cb6693593218c9e2a6f10505d190dd3c87461fb77f685e833180e2583bca19fdaf8f7267952f21dc752f4b4a9abf22a8a7f67fe1c85ce3c0
6
+ metadata.gz: 9fbd146e351da8f603c8b00c236d92c7a2a3c383296736f271c88b0ac310086adf0127af7b630e9087ec45c4a22494128b2efafdb2592de43df4aae4a68ef1f3
7
+ data.tar.gz: eecb817b76bc0f217b728c7e862f73758e4b2db9c6a943311e0c7d10d8e7fe6bfa8e56a7c0d4593158fb605927813a1e720ec85a9d7e70aae8ecce015f5da647
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/httpx.svg)](http://rubygems.org/gems/httpx)
4
4
  [![pipeline status](https://gitlab.com/honeyryderchuck/httpx/badges/master/pipeline.svg)](https://gitlab.com/honeyryderchuck/httpx/commits/master)
5
- [![coverage report](https://gitlab.com/honeyryderchuck/httpx/badges/master/coverage.svg)](https://honeyryderchuck.gitlab.io/httpx/coverage/#_AllFiles)
5
+ [![coverage report](https://gitlab.com/honeyryderchuck/httpx/badges/master/coverage.svg?job=coverage)](https://honeyryderchuck.gitlab.io/httpx/coverage/#_AllFiles)
6
6
 
7
7
  HTTPX is an HTTP client library for the Ruby programming language.
8
8
 
@@ -10,19 +10,21 @@ Among its features, it supports:
10
10
 
11
11
  * HTTP/2 and HTTP/1.x protocol versions
12
12
  * Concurrent requests by default
13
- * Simple and chainable API (based on HTTP.rb, itself based on Python Requests)
13
+ * Simple and chainable API
14
14
  * Proxy Support (HTTP(S), Socks4/4a/5)
15
15
  * Simple Timeout System
16
- * Lightweight (explicit feature loading)
16
+ * Lightweight by default (require what you need)
17
17
 
18
- And among others
18
+ And also:
19
19
 
20
20
  * Compression (gzip, deflate, brotli)
21
21
  * Authentication (Basic Auth, Digest Auth)
22
+ * Expect 100-continue
23
+ * Multipart Requests
22
24
  * Cookies
23
25
  * HTTP/2 Server Push
24
26
  * H2C Upgrade
25
- * Redirect following
27
+ * Automatic follow redirects
26
28
 
27
29
  ## How
28
30
 
@@ -0,0 +1,7 @@
1
+ # Genesis Release
2
+
3
+ This is the first release of `httpx`.
4
+
5
+ It accomplishes all the API and feature goals necessary to its first use, which is testing server implementations.
6
+
7
+ From here on, the sky is the limit.
@@ -0,0 +1,9 @@
1
+ # 0.0.2
2
+
3
+ * Hot-Fixed a flaw from the first version which was breaking https calls (SNI was broken).
4
+
5
+ * Added a few test hackernews scraping scripts, which will be used for trouble-shooting/benchmarking.
6
+
7
+ * Refactored/Fixed closing connections (HTTP/2 connections were buffering but not sending the GOAWAY frame)
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # 0.0.3
2
+
3
+ * Added `HTTPX::Response#raise_for_status`. If there was an error response, it will raise it's exception. If the HTTP response has a 4xx or 5xx error, it will raise an `HTTPX::HTTPError` exception (this feature was inspired by a similar feature in python requests library).
4
+
5
+ * Added `HTTPX::Client#wrap`, which allows to use the client inside a block and keep connections open, without resorting to the initializer only.
6
+
7
+ * TCP connection establishment errors are now wrapped in error responses, like other possible errors.
8
+
9
+ * SSL non-blocking connection API is now in use (it was previously using the blocking connect API, and was breaking the hackernews script from time to time. Now I'm looking at you, DNS).
@@ -0,0 +1,7 @@
1
+ # 0.0.4
2
+
3
+ * Added ANSI coloring to the debugging output (when in TTY mode).
4
+
5
+ * `HTTPX::HTTPError` exceptions now carry the full response object, instead of just the status (so the user can inspect the body and headers if it so desires).
6
+
7
+ * Fixed a bug related with HTTP/1 multiple requests on a domain which closed connections not being able to open a new socket to the domain.
@@ -0,0 +1,5 @@
1
+ # 0.0.5
2
+
3
+ * Fixed HTTP/1 pipelining (it's working again).
4
+
5
+ * Fixed multiple requests to the same domain over https (SSL sockets weren't being properly reopened).
@@ -0,0 +1,9 @@
1
+ # 0.1.0
2
+
3
+ * Follow Redirects Plugin: Added `:follow_insecure_redirects` option, which will not follow https-to-http redirects.
4
+
5
+ * Allow optional option `:transport`. TCP sockets are the default tranport, but by passing `:unix`, one can also define it as a UNIX socket.
6
+
7
+ * Added Retries Plugin, which will retry a request a certain amount of times, provided that the request is safe.
8
+
9
+ * Proxy Plugin: allow multiple proxies to be passed. The client will perform requests on the first proxy successfully connected.
@@ -0,0 +1,5 @@
1
+ # 0.2.0
2
+
3
+ * Custom Resolvers: Non-blocking DNS Resolver, DNS-over-HTTPS Resolver
4
+
5
+ * HTTP/2 connection coalescing
@@ -0,0 +1,16 @@
1
+ # 0.2.1
2
+
3
+ * fixed setting timeouts using the chainable API
4
+
5
+ * Basic Auth: proper user/password escaping
6
+
7
+ * Improved multi-request support, by allowing to pass request-specific options for multiple requests
8
+
9
+ ```ruby
10
+ tokens = ["TOKEN1", "TOKEN2", "TOKEN3"]
11
+ uri = "https://example.com/protected"
12
+
13
+ requests = tokens.map { |token| [uri, {headers: {'authorization': token} }] }
14
+
15
+ responses = HTTPX.get(*requests)
16
+ ```
@@ -0,0 +1,12 @@
1
+ # 0.3.0
2
+
3
+ * removed `http_parser.rb`, which is unmaintained, builds an old version of node's parser, and doesn't work on JRuby 9.2; also, better support over HTTP/1 features.
4
+
5
+ * Alt-Svc support (all remaining origin requests will be routed there); Supports both `Alt-Svc` header and the `altsvc` HTTP/2 frame.
6
+
7
+ * moved multipart requests support to a separate plugin, which removed `http_form_data` as a hard dependency (you'll still need it for the plugin though).
8
+
9
+ * new `HTTP.wrap { |client| }` method.
10
+
11
+ * We have a cheatsheet! 
12
+
@@ -0,0 +1,6 @@
1
+ # 0.3.1
2
+
3
+ * improved DNS resolution error handling (decoding/encoding errors, system resolver)
4
+
5
+ * hotfix: Native/HTTPS resolver not retrying same record type after cache expired, effectively not working after some time for long-running processes
6
+
@@ -0,0 +1,51 @@
1
+ # 0.4.0
2
+
3
+ * Feature: SSH proxy plugin -> send requests over ssh gateway;
4
+
5
+ ```ruby
6
+ HTTPX.plugin(:"proxy/ssh").
7
+ with_proxy(uri: "ssh://localhost:2222",
8
+ username: "root",
9
+ auth_methods: %w[publickey],
10
+ host_key: "ssh-rsa",
11
+ keys: %w[test/support/ssh/ssh_host_ed25519_key]).get(URI)
12
+ ```
13
+
14
+ * Feature: Faraday Adapter
15
+
16
+ * refactoring: cookies plugin API simplification (this is a breaking change!):
17
+
18
+ ```ruby
19
+ session = HTTPX.plugin(:cookies)
20
+ session.with_cookies("a" => "b").get(...
21
+ session.cookies #=> session current cookie store, persists/updates session cookies as requests are processed
22
+ session.wrap do |session|
23
+ session.get(..) #=> "Set-Cookie"
24
+ ...
25
+ end #=> after this, cookie store resets to the state previous to wrap
26
+ ```
27
+
28
+ Removed `Session#cookie_store`
29
+
30
+ ```ruby
31
+ client = HTTPX.plugin(:cookies)
32
+ redirect_response = client.get(URI) #=> ... 302 ... Set-Cookie: "blablalba" ...
33
+ # this sets the cookies
34
+ # GET .... Cookie: "blablabla" ....
35
+ response = client.get(URI) #=> ... 200 ...
36
+ # also, setting cookies:
37
+
38
+ client.cookies("a" => "b").get(URI) # ... Cookie: "a=b" ...
39
+
40
+ #also seamlessly integrates with redirect follows
41
+ client = HTTPX.plugins(:follow_redirects, :cookies)
42
+ response = client.get(URI) #=> ... 200 ...
43
+ ```
44
+
45
+ * refactoring: connection pool now thread-local, improves thread-safety;
46
+
47
+ * bugfix: leaking dns query when passing IO object as option;
48
+
49
+ * bugfix: now multiple different resolvers are supported;
50
+
51
+ * support: JRuby is again supported (as usual, only latest stable is guaranteed)
@@ -0,0 +1,3 @@
1
+ # 0.4.1
2
+
3
+ This was a fix release for some issues around exceptions on requests, and to make the faraday adapter work well with ssl.
@@ -0,0 +1,15 @@
1
+ # 0.5.0
2
+
3
+ This release is a minor bump only because it introduces a new dependency:
4
+
5
+ ## the `timers` gem
6
+
7
+ We've introduced the [`timers` gem](https://github.com/socketry/timers) as a dependency to deal with total timeouts, thereby making the timeout object only a container of values to be refactored. This was in itself a small gain for such a big addition, but other future time-based features can be best built upon it than the existing work.
8
+
9
+
10
+ ## Bugfixes
11
+
12
+ * the altsvc header wasn't properly parsed, and was breaking requests to google. Don't break requests to google!
13
+ * Added support for faraday 0.16;
14
+ * Made the IO selector less flaky;
15
+ * Fixed the homepage, which was being displayed without styles;
@@ -0,0 +1,14 @@
1
+ # 0.5.1
2
+
3
+ ## Improvements
4
+
5
+ * Fixed flakiness of test suite introduced in the 0.4 versions;
6
+ * compression plugin:
7
+ * do not send `accept-encoding` header when `range` is present;
8
+ * Remove from `content-encoding` if body stream decodes it;
9
+ * Added `HTTPX::Response::Body#encodings` to return the decoded encoding(s);
10
+
11
+ ## Bugfixes
12
+
13
+ * non-UTF-8 bodies weren't being properly handled, which led to a loop report (`slice` -> `byteslice`);
14
+ * connection reuse now also happens for requests with body (it was only working with `GET`s and other bodyless requests before);
@@ -0,0 +1,5 @@
1
+ # 0.6.0
2
+
3
+ ## Improvements
4
+
5
+ * Switches `http-2` gem with `http-2-next`, a fork with a focus on spec compliance.
@@ -0,0 +1,6 @@
1
+ # 0.6.1
2
+
3
+ ## Bugfixes
4
+
5
+ * If an http2 connection error happened before streams were open, errors weren't propagated, and there was an infinite loop.
6
+ * Bumping `http-2-next`, fixes the flow control issue causing requests to cloudfront to fail.
@@ -0,0 +1,6 @@
1
+ # 0.6.2
2
+
3
+ ## Bugfixes
4
+
5
+ * Remove escaping of request uri;
6
+ * strip header value (if value have newline, for example);
@@ -0,0 +1,13 @@
1
+ # 0.6.3
2
+
3
+ ## Improvements
4
+
5
+ * HTTP/2 `ORIGIN` frame support (https://tools.ietf.org/html/draft-ietf-httpbis-origin-frame-06);
6
+ * Added functional tests for HTTP/2 connection coalescing (and fixed it, as it hasn't been working for a while);
7
+ * Added functional tests for `Alt-Svc` header support;
8
+
9
+ ## Bugfixes
10
+
11
+ * fixing alternative service redirection if `alt-svc` header pointed to the current peer;
12
+ * fixing `alt-svc` support when ruby version does not support ALPN negotation;
13
+
@@ -0,0 +1,21 @@
1
+ # 0.6.4
2
+
3
+ This release takes where the last left off, and makes a concerted effort to improve both the test coverage and the number of features for which there are functional tests.
4
+
5
+ ## Improvements
6
+
7
+ * Running Ruby 2.7 with no warnings;
8
+
9
+ * Test suite now has functional tests for:
10
+ * authentication on proxies (http, socks4a, socks5);
11
+ * DNS-over-HTTPS;
12
+ * connect timeouts (still a bit flaky though);
13
+
14
+ * Improved test coverage of project to 90%;
15
+
16
+ * building website/blog with Jekyll 4;
17
+
18
+ ## Bugfixes
19
+
20
+ * fixed regressions on HTTP, SOCKS4a and SOCKS5 proxy authentication;
21
+ * fixed DNS-over-HTTPS implementation to be compliant with the latest RFC;
@@ -0,0 +1,22 @@
1
+ # 0.6.5
2
+
3
+ This release fixes important bugs, and automates the PKI for the test suite.
4
+
5
+ ## Features
6
+
7
+ * `resolver_options` can now receive a `:cache` flag (default: `true`). This bypasses caching and forces the lookup;
8
+
9
+ ## Improvements
10
+
11
+ * Building the TLS certs necessary for the test suite has been scripted, after the initial certs expired and brought the CI to a halt;
12
+ * All DNS resolvers have a functional test, both for the happy as well as the error case;
13
+ * Added functional tests for HTTP and HTTPS proxy with authentication, making all proxy options now tested with authentication;
14
+
15
+
16
+ ## Bugfixes
17
+
18
+ * native and https DNS resolvers weren't usable after a resolving error;
19
+ * system DNS resolver could halt the system after a dns resolving error;
20
+ * fixed system halt on HTTP proxy authentication error;
21
+
22
+
@@ -0,0 +1,19 @@
1
+ # 0.6.6
2
+
3
+ ## Features
4
+
5
+ * The `retries` plugin receives two new options:
6
+ * `retry_on`: a callable that receives the failed response as an argument; the return value will determine whether there'll be a retried request.
7
+ * `retry_after`: time (in seconds) after which there request will be retried. Can be an integer or a callable that receives the request and returns an integer (one can do exponential back-off like that, for example).
8
+ * Added support for DNS-over-HTTPS GET requests as per the latest spec.
9
+
10
+ ## Improvements
11
+
12
+ * `HTTPX.plugins` got deprecated; basically, it's great until you have to pass options to a plugin, and then it just works (not). The recommended way to load multiple plugins is `HTTPX.plugin(...).plugin(...)`.
13
+
14
+
15
+ ## Bugfixes
16
+
17
+ * fixed a proxy bug where an `Alt-Svc` response header would make the client try to connect. Just like connection coalescing and the ORIGIN frame, it ignores it when going through a proxy.
18
+
19
+
@@ -0,0 +1,5 @@
1
+ # 0.6.7
2
+
3
+ ## Bugfixes
4
+
5
+ * An error was reported when using the follow plugin allowing insecure redirects: if the insecure redirect would be for the same host, and the original request was performed with HTTP/2, the library would try to coalesce the request, and blocks the reactor. A check was made to ensure that connection only coalesces if both are https connections.
@@ -0,0 +1,46 @@
1
+ # 0.7.0
2
+
3
+
4
+ ## Features
5
+
6
+ New option: `:max_requests`. This is a connection-level option signalizing how many requests can be performed on a connection. Although the HTTP/1 parser defined this well, in HTTP/2 this wasn't very clear, so: by definition, the remote MAX_CONCURRENT_STREAMS setting will be used to define it, unless the user explicitly passed the option. You can also pass `:max_requests => Float::INFINITY` if you know that the server allows more requests than that on a connection.
7
+
8
+ New plugin: `:expect`.
9
+
10
+ Although there was support for `expect: 100-continue` header already when passed, this plugin can:
11
+
12
+ * automatically set the header on requests with body;
13
+ * execute the flow;
14
+ * recover from 417 status errors (i.e. try again without it);
15
+ * send body after X seconds if no 100 response came;
16
+
17
+ Suport for `with_` methods for the session. As long as the suffix is a valid attribute, it's just like that:
18
+
19
+ ```ruby
20
+ HTTPX.with_timeout(...).with_ssl(...)
21
+ # same as:
22
+ # HTTPX.with(timeout: ..., ssl: ...)
23
+ ```
24
+
25
+ ## Improvements
26
+
27
+ ### Connections
28
+
29
+ The following improvements make the `persistent` plugin way more resilient:
30
+
31
+ * Better balancing of HTTP/2 connections by distributing requests among X connections depending of how many requests they can process.
32
+ * Exhausted connections can off-load to a new same-origin connection (such as, when the server negotiates less `MAX_CONCURRENT_STREAMS` than what's expected).
33
+
34
+ ### Timeouts
35
+
36
+ (Timeouts will be one of the main improvements from the 0.7.x series)
37
+
38
+ `:total_timeout` is now a connection-level directive, which means that this feature will actually make more sense and account for all requests in a block at the same time, instead of one-by-one.
39
+
40
+ ### Options
41
+
42
+ Option setters were being bypassed, therefore a lot of the type-checks defined there weren't effectively being picked upon, which could have led to weird user errors.
43
+
44
+ ## Bugfixes
45
+
46
+ * fixed the `push_promise` plugin integration (wasn't working well since `http-2-next` was adopted);
@@ -0,0 +1,27 @@
1
+ # 0.8.0
2
+
3
+
4
+ ## Features
5
+
6
+ * `keep_alive_timeout`: for persistent connections, the keep alive timeout will set the connection to be closed if not reused for a request **after** the last received response;
7
+
8
+ ## Improvements
9
+
10
+ * using `max_requests` for HTTP/1 pipelining as well;
11
+ * `retries` plugin now works with plain HTTP responses (not just error responses);
12
+ * reduced the number of string allocations from log labels;
13
+ * performance: a lot of improvements were made to optimize the "waiting for IO events" phase, which dramatically reduced the CPU usage and make the performance of the library more on-par with other ruby HTTP gems for the 1-shot request scenario.
14
+
15
+
16
+ ## Bugfixes
17
+
18
+ * fixed `HTTPX::Response#copy_to`;
19
+ * fixed `compression` plugin not properly compressing request bodies using `gzip`;
20
+ * fixed `compression` plugin not handling `content-encoding: identity` payloads;
21
+ * do not overwrite user-defined `max_requests`on HTTP2 connection handshake;
22
+ * `retries` plugin: connection was blocking when a request with body was retried;
23
+ * `alt-svc: clear` response header was causing the process to hang;
24
+
25
+ ## Tests
26
+
27
+ * Code coverage improved to 91%;
@@ -0,0 +1,8 @@
1
+ # 0.8.1
2
+
3
+
4
+ ## Bugfixes
5
+
6
+ * fixing HTTP/2 handshake IO interests calculation;
7
+ * fixed the double ctrl+f issue when terminating an ongoing HTTP/2 request;
8
+ * fixed connection comparison when passing headers;
@@ -0,0 +1,7 @@
1
+ # 0.8.2
2
+
3
+ ## Features
4
+
5
+ * `:expect` plugin now supports a new option, `:expect_threshold_size`, meaning: the byte size threshold below which no `expect` header will be sent with requests with payload.
6
+ * `:compression` plugin now supports a new option, `:compression_threshold_size`, meaning: the bytesize threshold below which request payload won't be compressed before being sent.
7
+ * for HTTP/2 connections, when `keep_alive_timeout` expires, a `PING` frame is used to check connection availability; if successful, the connection will be reused.