async-http 0.20.0 → 0.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/lib/async/http/protocol/http10.rb +2 -1
- data/lib/async/http/protocol/http11.rb +1 -2
- data/lib/async/http/server.rb +1 -2
- data/lib/async/http/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e2ccca558821a89422a242433967db6a93a19814c0c0bf156f5452d5a1c0c12
|
4
|
+
data.tar.gz: 022b29ba936dc2bb708d533990a4ae76a860204577501868702bd795cebb5a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f45639f625e7bd3b8436598e154c0d066a7b6f8a70ac139895a7f216b2f91490fa2e233367c2e7b762fba28d60e503b75e957ec94fb3151161d59e2e3990a8d0
|
7
|
+
data.tar.gz: f58a004544f86561eb826474d9e55e24de78355ae81540087b6ae693e27378bd842d281e37c460c57ac6593c6e273bc549cf1dd4bffec8cb2465518d96e78b77
|
data/.gitignore
CHANGED
@@ -26,6 +26,7 @@ module Async
|
|
26
26
|
# Implements basic HTTP/1.1 request/response.
|
27
27
|
class HTTP10 < HTTP11
|
28
28
|
VERSION = "HTTP/1.0".freeze
|
29
|
+
KEEP_ALIVE = 'keep-alive'.freeze
|
29
30
|
|
30
31
|
def version
|
31
32
|
VERSION
|
@@ -45,7 +46,7 @@ module Async
|
|
45
46
|
write_response(response.version, response.status, response.headers, response.body)
|
46
47
|
|
47
48
|
unless persistent?(request.headers) && persistent?(headers)
|
48
|
-
@
|
49
|
+
@persistent = false
|
49
50
|
|
50
51
|
break
|
51
52
|
end
|
@@ -56,7 +56,6 @@ module Async
|
|
56
56
|
alias client new
|
57
57
|
end
|
58
58
|
|
59
|
-
KEEP_ALIVE = 'keep-alive'.freeze
|
60
59
|
CLOSE = 'close'.freeze
|
61
60
|
|
62
61
|
VERSION = "HTTP/1.1".freeze
|
@@ -125,7 +124,7 @@ module Async
|
|
125
124
|
headers = read_headers
|
126
125
|
body = read_body(headers)
|
127
126
|
|
128
|
-
@
|
127
|
+
@persistent = persistent?(headers)
|
129
128
|
|
130
129
|
return version, Integer(status), reason, headers, body
|
131
130
|
end
|
data/lib/async/http/server.rb
CHANGED
@@ -42,9 +42,8 @@ module Async
|
|
42
42
|
|
43
43
|
def accept(peer, address, task: Task.current)
|
44
44
|
peer.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
|
45
|
-
block_size = peer.getsockopt(Socket::SOL_SOCKET, Socket::SO_RCVBUF).int
|
46
45
|
|
47
|
-
stream = Async::IO::Stream.new(peer
|
46
|
+
stream = Async::IO::Stream.new(peer)
|
48
47
|
protocol = @protocol_class.server(stream)
|
49
48
|
|
50
49
|
# Async.logger.debug(self) {"Incoming connnection from #{address.inspect}"}
|
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.20.
|
4
|
+
version: 0.20.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|