falcon 0.22.1 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/falcon/adapters/rack.rb +3 -1
- data/lib/falcon/version.rb +1 -1
- data/lib/rack/handler/falcon.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ad8912f89a8a19ccbe962c4c381ca16eb6d840336df23d0c4a5891ada31ca7f
|
|
4
|
+
data.tar.gz: 75891fe68eb4027572a7e3f34d14881dbc3d74dab98bbd013eb066080d412bbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0fe2de11207ab1887eeb78252abe448c3fbfc01abc4d3dc9bf777f004bba65ea2ae35bad8b7ac5485799ae473598e4e824ff4095800afb9fb5402908f0c87360
|
|
7
|
+
data.tar.gz: dbee0d708311e799dbc2f2e7a184fe10ae6d98380e11a9b54499e52df1e938bf2452a372021227279b8b0b2e17daaa5c561d2327b8a825b346f5a4728f86c73c
|
data/lib/falcon/adapters/rack.rb
CHANGED
|
@@ -33,6 +33,7 @@ module Falcon
|
|
|
33
33
|
PATH_INFO = 'PATH_INFO'.freeze
|
|
34
34
|
REQUEST_METHOD = 'REQUEST_METHOD'.freeze
|
|
35
35
|
REQUEST_PATH = 'REQUEST_PATH'.freeze
|
|
36
|
+
REQUEST_URI = 'REQUEST_URI'.freeze
|
|
36
37
|
SCRIPT_NAME = 'SCRIPT_NAME'.freeze
|
|
37
38
|
QUERY_STRING = 'QUERY_STRING'.freeze
|
|
38
39
|
SERVER_PROTOCOL = 'SERVER_PROTOCOL'.freeze
|
|
@@ -136,7 +137,8 @@ module Falcon
|
|
|
136
137
|
# The remainder of the request URL's “path”, designating the virtual “location” of the request's target within the application. This may be an empty string, if the request URL targets the application root and does not have a trailing slash. This value may be percent-encoded when originating from a URL.
|
|
137
138
|
PATH_INFO => request_path,
|
|
138
139
|
REQUEST_PATH => request_path,
|
|
139
|
-
|
|
140
|
+
REQUEST_URI => request.path,
|
|
141
|
+
|
|
140
142
|
# The portion of the request URL that follows the ?, if any. May be empty, but is always required!
|
|
141
143
|
QUERY_STRING => query_string || '',
|
|
142
144
|
|
data/lib/falcon/version.rb
CHANGED
data/lib/rack/handler/falcon.rb
CHANGED
|
@@ -9,6 +9,7 @@ module Rack
|
|
|
9
9
|
module Handler
|
|
10
10
|
module Falcon
|
|
11
11
|
SCHEME = "http".freeze
|
|
12
|
+
NAME = :falcon
|
|
12
13
|
|
|
13
14
|
def self.endpoint_for(**options)
|
|
14
15
|
host = options[:Host] || 'localhost'
|
|
@@ -24,13 +25,14 @@ module Rack
|
|
|
24
25
|
app = ::Falcon::Adapters::Rewindable.new(app)
|
|
25
26
|
|
|
26
27
|
server = ::Falcon::Server.new(app, endpoint, Async::HTTP::Protocol::HTTP1, SCHEME)
|
|
27
|
-
|
|
28
|
+
yield server if block_given?
|
|
29
|
+
|
|
28
30
|
Async::Reactor.run do
|
|
29
31
|
server.run
|
|
30
32
|
end
|
|
31
33
|
end
|
|
32
34
|
end
|
|
33
35
|
|
|
34
|
-
register
|
|
36
|
+
register Falcon::NAME, Falcon
|
|
35
37
|
end
|
|
36
38
|
end
|