async-http 0.49.0 → 0.49.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/async/http.rb +2 -0
- data/lib/async/http/body.rb +2 -0
- data/lib/async/http/body/delayed.rb +2 -0
- data/lib/async/http/body/hijack.rb +2 -0
- data/lib/async/http/body/slowloris.rb +2 -0
- data/lib/async/http/body/stream.rb +2 -0
- data/lib/async/http/body/writable.rb +2 -0
- data/lib/async/http/client.rb +2 -0
- data/lib/async/http/endpoint.rb +4 -2
- data/lib/async/http/internet.rb +17 -2
- data/lib/async/http/pool.rb +2 -0
- data/lib/async/http/protocol.rb +2 -0
- data/lib/async/http/protocol/http1.rb +2 -0
- data/lib/async/http/protocol/http1/client.rb +2 -0
- data/lib/async/http/protocol/http1/connection.rb +2 -0
- data/lib/async/http/protocol/http1/request.rb +2 -0
- data/lib/async/http/protocol/http1/response.rb +2 -0
- data/lib/async/http/protocol/http1/server.rb +2 -0
- data/lib/async/http/protocol/http10.rb +2 -0
- data/lib/async/http/protocol/http11.rb +2 -0
- data/lib/async/http/protocol/http2.rb +2 -0
- data/lib/async/http/protocol/http2/client.rb +2 -0
- data/lib/async/http/protocol/http2/connection.rb +2 -0
- data/lib/async/http/protocol/http2/request.rb +2 -0
- data/lib/async/http/protocol/http2/response.rb +2 -0
- data/lib/async/http/protocol/http2/server.rb +2 -0
- data/lib/async/http/protocol/http2/stream.rb +2 -0
- data/lib/async/http/protocol/https.rb +2 -0
- data/lib/async/http/protocol/request.rb +2 -0
- data/lib/async/http/protocol/response.rb +2 -0
- data/lib/async/http/proxy.rb +2 -0
- data/lib/async/http/reference.rb +2 -0
- data/lib/async/http/server.rb +2 -0
- data/lib/async/http/statistics.rb +2 -0
- data/lib/async/http/version.rb +3 -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: 234d08278fa38ecca5449b3c94220d956f53c564291fe6a71e5b5152e0f5bace
|
4
|
+
data.tar.gz: a60712a3e7483dc7bb60d220b439b6f749f15ca0ca70375d3aa10d1460849168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63f4a410af4f4d6777f6c1c00ca96855c8d8c6057ae4ce43a2f277798f29bf1385dc2bf7d4a3d1eaa76bb16d260d93cf8da1b1679b83defd46b5c7fb91508817
|
7
|
+
data.tar.gz: 136a88be9c5e3de646e7249a905627a1f9621d1218d3f4a36fc522aa31d60278b410262b5c7667dc03ac89dfce40ad7e53978f2d798860f9deef6ab0f74e8bd2
|
data/lib/async/http.rb
CHANGED
data/lib/async/http/body.rb
CHANGED
data/lib/async/http/client.rb
CHANGED
data/lib/async/http/endpoint.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
1
3
|
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -126,7 +128,7 @@ module Async
|
|
126
128
|
buffer = @url.path || "/"
|
127
129
|
|
128
130
|
if query = @url.query
|
129
|
-
buffer
|
131
|
+
buffer = "#{buffer}?#{query}"
|
130
132
|
end
|
131
133
|
|
132
134
|
return buffer
|
@@ -197,7 +199,7 @@ module Async
|
|
197
199
|
end
|
198
200
|
|
199
201
|
def key
|
200
|
-
[@url
|
202
|
+
[@url, @options]
|
201
203
|
end
|
202
204
|
|
203
205
|
def eql? other
|
data/lib/async/http/internet.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
1
3
|
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -32,9 +34,10 @@ module Async
|
|
32
34
|
|
33
35
|
def call(method, url, headers = [], body = nil)
|
34
36
|
endpoint = Endpoint.parse(url)
|
37
|
+
key = host_key(endpoint)
|
35
38
|
|
36
|
-
client = @clients.fetch(
|
37
|
-
@clients[
|
39
|
+
client = @clients.fetch(key) do
|
40
|
+
@clients[key] = self.client_for(endpoint)
|
38
41
|
end
|
39
42
|
|
40
43
|
body = Body::Buffered.wrap(body)
|
@@ -58,6 +61,18 @@ module Async
|
|
58
61
|
self.call(verb, url.to_str, headers, body)
|
59
62
|
end
|
60
63
|
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
def host_key(endpoint)
|
68
|
+
url = endpoint.url.dup
|
69
|
+
|
70
|
+
url.path = ""
|
71
|
+
url.fragment = nil
|
72
|
+
url.query = nil
|
73
|
+
|
74
|
+
return url
|
75
|
+
end
|
61
76
|
end
|
62
77
|
end
|
63
78
|
end
|
data/lib/async/http/pool.rb
CHANGED
data/lib/async/http/protocol.rb
CHANGED
data/lib/async/http/proxy.rb
CHANGED
data/lib/async/http/reference.rb
CHANGED
data/lib/async/http/server.rb
CHANGED
data/lib/async/http/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
1
3
|
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -20,6 +22,6 @@
|
|
20
22
|
|
21
23
|
module Async
|
22
24
|
module HTTP
|
23
|
-
VERSION = "0.49.
|
25
|
+
VERSION = "0.49.1"
|
24
26
|
end
|
25
27
|
end
|
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.49.
|
4
|
+
version: 0.49.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: 2019-
|
11
|
+
date: 2019-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|