http 0.9.1 → 0.9.2

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
  SHA1:
3
- metadata.gz: adf2b0298c33a4f751b0b8ad323e425fbb556dff
4
- data.tar.gz: d2a92940efef91c6e5054270d39eed2c46c182d0
3
+ metadata.gz: ab9b540a68db221ff6f7fd5f82ba2b518c80bade
4
+ data.tar.gz: 17062a814f863f5fc9c89b5dc3a9f13f785913f6
5
5
  SHA512:
6
- metadata.gz: 752ab8075356ebbe1f69d8bddffb0aac8c3f98c2eab868861da6c4ae136730d08165cbf6cc98942e1199c8c515e940a2bc99dc18cd5de6f074ee35248cedd4a2
7
- data.tar.gz: 8745c0368a70ef0b7a130f744e62acc952b540712ac44b573d8d4bbbba583eb82f41d6560af971069b46a1611306fe25e268af2540316919310a4b06d8160d48
6
+ metadata.gz: 3894d6b7eb652f73d842492fe11efb2b15070cb9a6aa64759dcbd9bf3249e76c5e154bc453c123601922afcbcab02a8da9858daa0d55b37e9a9fef9ec20ec43e
7
+ data.tar.gz: 54245ef8c606aec07ea913e33af03b0356e12fd573c6dff9b5bc952768c37985e44939634d5f81189b8964d117db9e24395ea1803b1f4d1fbfe82f4089c590b8
data/CHANGES.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.9.2 (2015-08-18)
2
+ * Fixed exceptionless NIO EOF handling. (@zanker)
3
+
1
4
  ## 0.9.1 (2015-08-14)
2
5
 
3
6
  * Fix params special-chars escaping. See #246. (@ixti)
@@ -9,6 +12,11 @@
9
12
  * JRuby 9000 compatibility
10
13
 
11
14
 
15
+ ## 0.8.13 (2015-08-14)
16
+
17
+ * Backport params special-chars escaping fix from `v0.9.1`. (@ixti)
18
+
19
+
12
20
  ## 0.8.12 (2015-05-26)
13
21
 
14
22
  * Fix `HTTP.timeout` API (was loosing previously defined options). (@ixti)
@@ -208,9 +208,11 @@ module HTTP
208
208
  return if @parser.finished?
209
209
 
210
210
  value = @socket.readpartial(size)
211
- @parser << value unless value == :eof
212
-
213
- nil
211
+ if value == :eof
212
+ :eof
213
+ elsif value
214
+ @parser << value
215
+ end
214
216
  end
215
217
  end
216
218
  end
@@ -76,7 +76,11 @@ module HTTP
76
76
 
77
77
  loop do
78
78
  result = socket.read_nonblock(size, :exception => false)
79
- break result unless result == :wait_readable
79
+ if result.nil?
80
+ return :eof
81
+ elsif result != :wait_readable
82
+ return result
83
+ end
80
84
 
81
85
  IO.select([socket], nil, nil, time_left)
82
86
  log_time
@@ -55,7 +55,11 @@ module HTTP
55
55
  def readpartial(size)
56
56
  loop do
57
57
  result = socket.read_nonblock(size, :exception => false)
58
- break result unless result == :wait_readable
58
+ if result.nil?
59
+ return :eof
60
+ elsif result != :wait_readable
61
+ return result
62
+ end
59
63
 
60
64
  unless IO.select([socket], nil, nil, read_timeout)
61
65
  fail TimeoutError, "Read timed out after #{read_timeout} seconds"
data/lib/http/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module HTTP
2
- VERSION = "0.9.1".freeze
2
+ VERSION = "0.9.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-08-14 00:00:00.000000000 Z
14
+ date: 2015-08-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: http_parser.rb
@@ -183,9 +183,39 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  requirements: []
185
185
  rubyforge_project:
186
- rubygems_version: 2.2.3
186
+ rubygems_version: 2.4.6
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: HTTP should be easy
190
- test_files: []
190
+ test_files:
191
+ - spec/lib/http/client_spec.rb
192
+ - spec/lib/http/content_type_spec.rb
193
+ - spec/lib/http/headers/mixin_spec.rb
194
+ - spec/lib/http/headers_spec.rb
195
+ - spec/lib/http/options/body_spec.rb
196
+ - spec/lib/http/options/form_spec.rb
197
+ - spec/lib/http/options/headers_spec.rb
198
+ - spec/lib/http/options/json_spec.rb
199
+ - spec/lib/http/options/merge_spec.rb
200
+ - spec/lib/http/options/new_spec.rb
201
+ - spec/lib/http/options/proxy_spec.rb
202
+ - spec/lib/http/options_spec.rb
203
+ - spec/lib/http/redirector_spec.rb
204
+ - spec/lib/http/request/writer_spec.rb
205
+ - spec/lib/http/request_spec.rb
206
+ - spec/lib/http/response/body_spec.rb
207
+ - spec/lib/http/response/status_spec.rb
208
+ - spec/lib/http/response_spec.rb
209
+ - spec/lib/http_spec.rb
210
+ - spec/spec_helper.rb
211
+ - spec/support/black_hole.rb
212
+ - spec/support/capture_warning.rb
213
+ - spec/support/connection_reuse_shared.rb
214
+ - spec/support/dummy_server.rb
215
+ - spec/support/dummy_server/servlet.rb
216
+ - spec/support/http_handling_shared.rb
217
+ - spec/support/proxy_server.rb
218
+ - spec/support/servers/config.rb
219
+ - spec/support/servers/runner.rb
220
+ - spec/support/ssl_helper.rb
191
221
  has_rdoc: