async-http 0.40.2 → 0.40.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9467ea667ebfd156ef91b71cfa8da9598d73839cc378545672aa4db3338f80f9
|
4
|
+
data.tar.gz: 03e93ca6e98b1e22f58cde6542e44eba52f6193d779492dfba1be835c2f31d02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9890cd89c5e1148863714c1f517f3ad7edd62cefb6a7f513580a32649a055b67929b7e7c26b8440b00667b42854a9ccb4e8275df17bacbed6b9e73721e2f61e7
|
7
|
+
data.tar.gz: 7cc0038e3cd139cda370e485d29719b611224a156928de22de597293108b399057809b43c813d7b171cadc2ea926cb0e0760d6cd267bcf67d1bc5e9ac1290060
|
data/async-http.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_dependency("async-io", "~> 1.18")
|
21
21
|
|
22
22
|
spec.add_dependency("protocol-http", "~> 0.3.0")
|
23
|
-
spec.add_dependency("protocol-http1", "~> 0.
|
23
|
+
spec.add_dependency("protocol-http1", "~> 0.5.0")
|
24
24
|
spec.add_dependency("protocol-http2", "~> 0.2.0")
|
25
25
|
|
26
26
|
# spec.add_dependency("openssl")
|
@@ -25,9 +25,14 @@ module Async
|
|
25
25
|
module Protocol
|
26
26
|
module HTTP1
|
27
27
|
class Request < Protocol::Request
|
28
|
-
def
|
29
|
-
|
30
|
-
|
28
|
+
def self.read(protocol)
|
29
|
+
if parts = protocol.read_request
|
30
|
+
self.new(protocol, *parts)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def initialize(protocol, *parts)
|
35
|
+
super(nil, *parts)
|
31
36
|
@protocol = protocol
|
32
37
|
end
|
33
38
|
|
@@ -32,9 +32,10 @@ module Async
|
|
32
32
|
|
33
33
|
def next_request
|
34
34
|
# The default is true.
|
35
|
-
return
|
35
|
+
return unless @persistent
|
36
36
|
|
37
|
-
|
37
|
+
# Read an incoming request:
|
38
|
+
return unless request = Request.read(self)
|
38
39
|
|
39
40
|
unless persistent?(request.version, request.headers)
|
40
41
|
@persistent = false
|
data/lib/async/http/server.rb
CHANGED
@@ -60,9 +60,6 @@ module Async
|
|
60
60
|
# If this returns nil, we assume that the connection has been hijacked.
|
61
61
|
self.call(request)
|
62
62
|
end
|
63
|
-
rescue EOFError, Errno::ECONNRESET, Errno::EPIPE, Errno::EPROTOTYPE
|
64
|
-
# Sometimes client will disconnect without completing a result or reading the entire buffer. That means we are done.
|
65
|
-
# Errno::EPROTOTYPE is a bug with Darwin. It happens because the socket is lazily created (in Darwin).
|
66
63
|
end
|
67
64
|
|
68
65
|
def run
|
data/lib/async/http/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.40.
|
4
|
+
version: 0.40.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.5.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.5.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: protocol-http2
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
252
|
- !ruby/object:Gem::Version
|
253
253
|
version: '0'
|
254
254
|
requirements: []
|
255
|
-
rubygems_version: 3.0.
|
255
|
+
rubygems_version: 3.0.3
|
256
256
|
signing_key:
|
257
257
|
specification_version: 4
|
258
258
|
summary: A HTTP client and server library.
|