httpx 0.15.0 → 0.15.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db99d4bc2c59c9292882ced18f8b89a9137d13bca7cf0cb7a9e4a84609e0f385
4
- data.tar.gz: a42b6a825a7c3d098a9dca4a0a705e37eb0c17012533e66a2bd85ad7cb8897e7
3
+ metadata.gz: 71d64789176a94e104957666f409c327a17827e4384e1387c14c2471e1b98994
4
+ data.tar.gz: 0a516128ac747a041ae8e5d86da78c7687d124f830850484ed372c83d67e4745
5
5
  SHA512:
6
- metadata.gz: be7a3184672e1c7193e4acf538b5c3f8b3aacd257334055b59fac4303cb02701f12d6e35cfd553b641ac12ca0b10b47ff011f396f7ee8a3068f3785be9ad07f8
7
- data.tar.gz: 69cdeb266a69127135dd6d7c4cab6cc034ef7c5de11b4eee4bf135f3073c55dac4f25a7c1453fb6e73c4200470f9b374bde5aa1c91c004e264643813e9cb7e41
6
+ metadata.gz: 83f6d5041140e1670e7175db3d9a3269a3766a5b8b29076ba7ee4025ef035411a4458c5df25cce4d70a10fd34fdc1cbda30fa315b3a77c585d58672ec35f737d
7
+ data.tar.gz: '05298bf9e3fc41c8fe7315558a6842af2dbe915c8f5cfb119ca019cc8e83dbde93a9d57222bbf0098603b3fde00a5e8f1de05f4d62cf5fe81a6f7213a8c8107d'
@@ -41,4 +41,13 @@ A new timeout option, `settings_timeout`, is supported for the HTTP/2 handshake;
41
41
  # if you want to change
42
42
  HTTPX.with(timeout: {settings_timeout: 5})....
43
43
 
44
+ ```
45
+
46
+ IDNA 2008 support is now possibly, by integrating [idnx](https://github.com/HoneyryderChuck/idnx) into your dependencies:
47
+
48
+
49
+ ```ruby
50
+ # in Gemfile
51
+ gem "httpx"
52
+ gem "idnx"
44
53
  ```
@@ -0,0 +1,8 @@
1
+ # 0.15.1
2
+
3
+ ## Bugfixes
4
+
5
+ Fixed HTTP/1 connection accounting on requests:
6
+
7
+ * when persistent, Connection: close will be set based on the request position on the batch against the allowed requests on the open connection.
8
+ * when not persistent, Connnection: close will be set on the last request of the batch, being the batch a subset based on allowed requests, or the whole of it.
@@ -263,13 +263,24 @@ module HTTPX
263
263
  request.chunk!
264
264
  end
265
265
 
266
- requests_limit = [@max_requests, @requests.size].min
267
-
268
- connection = if request != @requests[requests_limit - 1] &&
269
- request.options.persistent && @max_requests != 1
270
- "keep-alive"
266
+ connection = if request.options.persistent
267
+ # when in a persistent connection, the request can't be at
268
+ # the edge of a renegotiation
269
+ if @requests.index(request) + 1 < @max_requests
270
+ "keep-alive"
271
+ else
272
+ "close"
273
+ end
271
274
  else
272
- "close"
275
+ # when it's not a persistent connection, it sets "Connection: close" always
276
+ # on the last request of the possible batch (either allowed max requests,
277
+ # or if smaller, the size of the batch itself)
278
+ requests_limit = [@max_requests, @requests.size].min
279
+ if request != @requests[requests_limit - 1]
280
+ "keep-alive"
281
+ else
282
+ "close"
283
+ end
273
284
  end
274
285
 
275
286
  {
data/lib/httpx/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTTPX
4
- VERSION = "0.15.0"
4
+ VERSION = "0.15.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httpx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Cardoso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-18 00:00:00.000000000 Z
11
+ date: 2021-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http-2-next
@@ -69,6 +69,7 @@ extra_rdoc_files:
69
69
  - doc/release_notes/0_14_4.md
70
70
  - doc/release_notes/0_14_5.md
71
71
  - doc/release_notes/0_15_0.md
72
+ - doc/release_notes/0_15_1.md
72
73
  - doc/release_notes/0_1_0.md
73
74
  - doc/release_notes/0_2_0.md
74
75
  - doc/release_notes/0_2_1.md
@@ -117,6 +118,7 @@ files:
117
118
  - doc/release_notes/0_14_4.md
118
119
  - doc/release_notes/0_14_5.md
119
120
  - doc/release_notes/0_15_0.md
121
+ - doc/release_notes/0_15_1.md
120
122
  - doc/release_notes/0_1_0.md
121
123
  - doc/release_notes/0_2_0.md
122
124
  - doc/release_notes/0_2_1.md