falcon 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/falcon/server.rb +12 -1
- data/lib/falcon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffde5c3cd28c595389deccb1c4252be6d08b1de3
|
4
|
+
data.tar.gz: 34a3af82b5e312e0c942142aab09401f1ad3335e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41f5be797dffbb54206cef86258b25efee38913270099c32b72dcdb02fea16f5add4b1a2c9b6e5291aef33171351863e1dd1f01f9801858079b117abe0d869f6
|
7
|
+
data.tar.gz: 1dfe0c9e4097c51029592fbd5b351c3ccb98d1d557205587bafb18834e737ea308c8e88162aebc484cf6927e339fd62fcd50ab155eef9402c03acf2176a4b68d
|
data/lib/falcon/server.rb
CHANGED
@@ -70,6 +70,11 @@ module Falcon
|
|
70
70
|
'SERVER_PORT' => server_port || '',
|
71
71
|
}.merge(request.headers)
|
72
72
|
|
73
|
+
env['rack.hijack?'] = true
|
74
|
+
env['rack.hijack'] = lambda do
|
75
|
+
env['rack.hijack_io'] = peer
|
76
|
+
end
|
77
|
+
|
73
78
|
if content_type = request.headers['HTTP_CONTENT_TYPE']
|
74
79
|
env['CONTENT_TYPE'] = content_type
|
75
80
|
end
|
@@ -78,7 +83,13 @@ module Falcon
|
|
78
83
|
env['REMOTE_ADDR'] = remote_address.ip_address if remote_address.ip?
|
79
84
|
end
|
80
85
|
|
81
|
-
|
86
|
+
response = @app.call(env)
|
87
|
+
|
88
|
+
if env['rack.hijack_io']
|
89
|
+
throw :hijack
|
90
|
+
else
|
91
|
+
return response
|
92
|
+
end
|
82
93
|
rescue => exception
|
83
94
|
logger.error "#{exception.class}: #{exception.message}\n\t#{$!.backtrace.join("\n\t")}"
|
84
95
|
|
data/lib/falcon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falcon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http
|