httpx 0.14.3 → 0.14.4

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: 716a91d8937fe675798bd8ad275cf5944616069149f2ace7b8c04c42c4cfeb19
4
- data.tar.gz: cb76bc4343b18a30e1ffb093885e899b7b0cc9c70f40e5b461f2de4d4cce89f6
3
+ metadata.gz: 495553e317911e0901a61617fac9bacd2ee33cb9c145eb01909fd09a8d1a6f9e
4
+ data.tar.gz: fb19c9915540fcc3358f18f37ac18c80812824d4dacffb69956577a7df3c96a5
5
5
  SHA512:
6
- metadata.gz: 789cb7389ada8841232580200950c0066e30071ae120323fbb2b4646ae69cf43422c8e181aa02d2820d315c0a4a839a4635d584f4a57218e30f1c66f07cbcb80
7
- data.tar.gz: 3815634b93c035a445557b4ae8718b985bbc8ee4776921cba4ee50fdb58dd31769e3f25aaa051f59df8aa96a0ab69a281e5a3ce7b013d762aa258f807afc74b7
6
+ metadata.gz: fa1c3937960cc63d447d33bc966ea453281537bdd35318becbe7c963aad82def455a657b0a7d72a5b1efe8021541f817c3657b38ca085b3643ec2f1e11a6f7cb
7
+ data.tar.gz: b8322a02d53e6922f0ec2a999cc9220a7cac74600b97e7e3e9f9b9ec003ef3c184184d90b2d976f7581422d1cf03355b57fc9c32dcdaf61651545a1d5ac30983
@@ -0,0 +1,5 @@
1
+ # 0.14.4
2
+
3
+ ## Bugfixes
4
+
5
+ * The HTTP/1 handler was miscalculating the last request for a given connection, and potentially freezing it.
@@ -258,7 +258,9 @@ module HTTPX
258
258
  request.chunk!
259
259
  end
260
260
 
261
- connection = if request.options.persistent || request != @requests[-1]
261
+ requests_limit = [@max_requests, @requests.size].min
262
+
263
+ connection = if request.options.persistent || request != @requests[requests_limit - 1]
262
264
  "keep-alive"
263
265
  else
264
266
  "close"
data/lib/httpx/idna.rb ADDED
@@ -0,0 +1,15 @@
1
+ module HTTPX
2
+ module IDNA
3
+ module_function
4
+
5
+ begin
6
+ require "idn"
7
+
8
+ def convert(non_ascii_hostname); end
9
+ rescue LoadError
10
+ def convert(non_ascii_hostname)
11
+ DomainName.new(non_ascii_hostname).hostname
12
+ end
13
+ end
14
+ end
15
+ end
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.14.3"
4
+ VERSION = "0.14.4"
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.14.3
4
+ version: 0.14.4
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-05-28 00:00:00.000000000 Z
11
+ date: 2021-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http-2-next
@@ -66,6 +66,7 @@ extra_rdoc_files:
66
66
  - doc/release_notes/0_14_1.md
67
67
  - doc/release_notes/0_14_2.md
68
68
  - doc/release_notes/0_14_3.md
69
+ - doc/release_notes/0_14_4.md
69
70
  - doc/release_notes/0_1_0.md
70
71
  - doc/release_notes/0_2_0.md
71
72
  - doc/release_notes/0_2_1.md
@@ -111,6 +112,7 @@ files:
111
112
  - doc/release_notes/0_14_1.md
112
113
  - doc/release_notes/0_14_2.md
113
114
  - doc/release_notes/0_14_3.md
115
+ - doc/release_notes/0_14_4.md
114
116
  - doc/release_notes/0_1_0.md
115
117
  - doc/release_notes/0_2_0.md
116
118
  - doc/release_notes/0_2_1.md
@@ -148,6 +150,7 @@ files:
148
150
  - lib/httpx/errors.rb
149
151
  - lib/httpx/extensions.rb
150
152
  - lib/httpx/headers.rb
153
+ - lib/httpx/idna.rb
151
154
  - lib/httpx/io.rb
152
155
  - lib/httpx/io/ssl.rb
153
156
  - lib/httpx/io/tcp.rb