httpx 0.8.0 → 0.8.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: 4ac832ee93155b950d27dde3d7295fae2b817a8b2c55c881ec07f73e97736c59
4
- data.tar.gz: 28251067c648230eed4435b9df7cf75bfc1c552162f37928a8ee6c5b485d6c3b
3
+ metadata.gz: 473b3b919edef3fda28912548afc872fd45603dd805757bb19c58eb9d1fbf393
4
+ data.tar.gz: 554c4b0ebff6f6f9293230c940f9096dc4bfe7361a3f0ba0d6217e2d75bd13e8
5
5
  SHA512:
6
- metadata.gz: d7b9f1419af3bb823ff58de80dca6a933bf25a756e27ff35f76c5ad7948ad1aab1c1f63f8eaf20bc9fc05bb0b2ed4932fd5ff1e33bcd7a8cda061bee2c54e4ac
7
- data.tar.gz: f410653e0e1646f36eeaf90746bfae17d8c344abdf44eb92df2a992897d24843d16e370ec54f6441bedfe779981d17e4b9c5316f73115adc77e0639cb8dba53f
6
+ metadata.gz: 9b393a0f4943af7fe478c45b9628f7a07bcfdaf3c59e743f893d21b76bee77100367851027ab597a39113f7c48d747eb2e994c0528a8697403ee8a3d8f6a9725
7
+ data.tar.gz: 6c3744eb31f1beba7f98a016c175d6b8d886093ad86eaa8920f3147b9df4d348c006f42689496bd93d67c304d44f5e7d2e1d47f71acc30fed9842fe263bb5886
@@ -281,13 +281,13 @@ module HTTPX
281
281
  return
282
282
  end
283
283
 
284
- log { "READ: #{siz} bytes..." }
285
-
286
284
  if siz.zero?
287
285
  read_drained = @read_buffer.empty?
288
286
  break
289
287
  end
290
288
 
289
+ log { "READ: #{siz} bytes..." }
290
+
291
291
  parser << @read_buffer.to_s
292
292
 
293
293
  break if @state == :closing || @state == :closed
@@ -36,7 +36,9 @@ module HTTPX
36
36
 
37
37
  return :w if @connection.state == :closed
38
38
 
39
- return :r unless (@connection.state == :connected && @handshake_completed)
39
+ unless (@connection.state == :connected && @handshake_completed)
40
+ return @buffer.empty? ? :r : :rw
41
+ end
40
42
 
41
43
  return :w unless @pending.empty?
42
44
 
@@ -67,7 +67,7 @@ module HTTPX
67
67
  #
68
68
  def [](field)
69
69
  a = @headers[downcased(field)] || return
70
- a.join(",")
70
+ a.join(", ")
71
71
  end
72
72
 
73
73
  # sets +value+ (if not nil) as single value for the +field+ header.
@@ -37,6 +37,9 @@ module HTTPX
37
37
 
38
38
  @timers.fire
39
39
  end
40
+ rescue Interrupt
41
+ @connections.each(&:reset)
42
+ raise
40
43
  rescue StandardError => e
41
44
  @connections.each do |connection|
42
45
  connection.emit(:error, e)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTTPX
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httpx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Cardoso