emmy-http-client 0.1.3 → 0.1.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
  SHA1:
3
- metadata.gz: c27535d963d40f0d17b129ab02e4cda3ac272b58
4
- data.tar.gz: 69c59bb5c7e76c3b0b8b3b3b71f37f93669d8f48
3
+ metadata.gz: 35283fd9ab14415f3033f0f384cf8f2596a1c21c
4
+ data.tar.gz: a93d21ba7741067a021714a507c0d7e53b704bda
5
5
  SHA512:
6
- metadata.gz: c65de5c246c347188b8b3fd1e58e91abbfa7bc332858d3d24cdddfb2da1ecaf47e50626908e58f647bcd15dc0a1a2d15109a5e828147dd8c5cd39c199a40edd5
7
- data.tar.gz: 56043aa98b97cd0114967e50978106d3fee22f0a967e2ea6b4e9fcb2cbc22cad0a19f9ca45156f1ebeb76c206712ee5eddce381e1b36c5abc4d6dd1d8d36f44b
6
+ metadata.gz: d93a2971c251fcc46f7b067249ad4a9e23ad8863fefc3a99c4677dbbccb1a08e2c1a233f7f23ee1718e0359538667ae0680df2586785e721fd17766ee891248d
7
+ data.tar.gz: 1c10235bcae47cc4b7135398a754caf9a677f81489e41b34902bdd01303c38ddfb08dca30c21bc414dc248d5e3b139c4619d95c925a1a24aa2c970f08306abd6
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency "event_object", "~> 0.9.1"
24
24
  spec.add_dependency "fibre", "~> 0.9.7"
25
25
  spec.add_dependency "emmy-machine", "~> 0.1.7"
26
- #spec.add_dependency "emmy-http", "~> 0.1.6"
26
+ spec.add_dependency "emmy-http", "~> 0.1.6"
27
27
 
28
28
  spec.add_development_dependency "bundler", "~> 1.9"
29
29
  spec.add_development_dependency "rake", "~> 10.0"
@@ -56,12 +56,13 @@ module EmmyHttp
56
56
 
57
57
  parser.on :completed do
58
58
  client.response.finish
59
+
59
60
  if request.keep_alive?
60
61
  change_state(:success)
61
62
  dettach(conn)
62
63
  operation.success!(response, operation, connection)
63
64
  else
64
- client.close
65
+ client.stop
65
66
  end
66
67
  end
67
68
 
@@ -99,6 +100,7 @@ module EmmyHttp
99
100
  self.response = nil
100
101
  parser.reset!
101
102
  operation.reconnect
103
+ return
102
104
  end
103
105
 
104
106
  if response && response.finished?
@@ -107,7 +109,7 @@ module EmmyHttp
107
109
  operation.success!(response, operation, connection)
108
110
  else
109
111
  change_state(:catch_error)
110
- operation.error!('invalid response')
112
+ operation.error!(reason.new.to_s || 'Invalid response')
111
113
  end
112
114
  end
113
115
 
@@ -169,7 +171,7 @@ module EmmyHttp
169
171
 
170
172
  unless headers.key? 'Host'
171
173
  headers['Host'] = url.host
172
- headers['Host'] += ":#{uri.port}" unless (url.scheme == 'http' && url.port == 80) ||
174
+ headers['Host'] += ":#{url.port}" unless (url.scheme == 'http' && url.port == 80) ||
173
175
  (url.scheme == 'https' && url.port == 443)
174
176
  end
175
177
  end
@@ -1,5 +1,5 @@
1
1
  module EmmyHttp
2
2
  module Client
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emmy-http-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - inre
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-21 00:00:00.000000000 Z
11
+ date: 2015-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http_parser.rb
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.1.7
69
+ - !ruby/object:Gem::Dependency
70
+ name: emmy-http
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.1.6
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.1.6
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement