httpx 0.11.2 → 0.11.3

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: 3455bd74f9d6c0cf65936bae67bf74b4d1d5fde21d254446cb4a4615a65b9bb9
4
- data.tar.gz: a8f4c6d743667725fcfb3f43c42ef0efbcdc9772f84ecd45f558d2d4c94c3345
3
+ metadata.gz: e1612c9f4696a7a6ae0508ea66f864654e28470e742b91b57cd14ab5b43adad2
4
+ data.tar.gz: 791569d7282f7cb3e451d245e332871c170e4571ca5e10ead757f93afffe3d78
5
5
  SHA512:
6
- metadata.gz: 835072956f05fcb3a42b3e128d64e5753409aa32e875426dda24d8ddbbffdd0fc6585a6d48abd48cd470962f0a57492c4b74afe529c4ab5c750d3039fdbe2b3d
7
- data.tar.gz: 8c8be2d19b36b4ad37f00a9f8ea9378e2f60e6e65e4f9513e84b24139480f529650e74c2a3c36a200d0e318ce86c2b15be37a2522032225ba0a9055cbac4534b
6
+ metadata.gz: 96e8bc5d07f59b21ccdbc54bb11bce9b1deb53eb128c4d6c2652a0dfca6c925cbe084e82f352857004420cc5753fbacc3a68e2bc4d885937a2afbfa5c6138836
7
+ data.tar.gz: b74cbac2346d110a97e6ab9a13f2a62db7ed23ce1454df510f9c8cb6ea58314edff2724b9cc269cdf8d5fdf00e9ce6c5c28eff864605f6ce01a9e2f4b9078911
@@ -0,0 +1,5 @@
1
+ # 0.11.3
2
+
3
+ ## Bugfixes
4
+
5
+ `EOFError` was being thrown when HTTP/1.1 non-chunked responses which don't contain a "content-length" header. The RFC mandates that the socket should be consumed until the server closes it, so a patch was implemented, to return the available response in such cases.
@@ -161,6 +161,16 @@ module HTTPX
161
161
  end
162
162
 
163
163
  def handle_error(ex)
164
+ if ex.is_a?(EOFError) && @request && @request.response &&
165
+ !@request.response.headers.key?("content-length") &&
166
+ !@request.response.headers.key?("transfer-encoding")
167
+ # if the response does not contain a content-length header, the server closing the
168
+ # connnection is the indicator of response consumed.
169
+ # https://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.4.4
170
+ on_complete
171
+ return
172
+ end
173
+
164
174
  if @pipelining
165
175
  disable
166
176
  else
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.11.2"
4
+ VERSION = "0.11.3"
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.11.2
4
+ version: 0.11.3
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-02-12 00:00:00.000000000 Z
11
+ date: 2021-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http-2-next
@@ -57,6 +57,7 @@ extra_rdoc_files:
57
57
  - doc/release_notes/0_11_0.md
58
58
  - doc/release_notes/0_11_1.md
59
59
  - doc/release_notes/0_11_2.md
60
+ - doc/release_notes/0_11_3.md
60
61
  - doc/release_notes/0_1_0.md
61
62
  - doc/release_notes/0_2_0.md
62
63
  - doc/release_notes/0_2_1.md
@@ -93,6 +94,7 @@ files:
93
94
  - doc/release_notes/0_11_0.md
94
95
  - doc/release_notes/0_11_1.md
95
96
  - doc/release_notes/0_11_2.md
97
+ - doc/release_notes/0_11_3.md
96
98
  - doc/release_notes/0_1_0.md
97
99
  - doc/release_notes/0_2_0.md
98
100
  - doc/release_notes/0_2_1.md