falcon 0.17.0 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/falcon/adapters/rack.rb +3 -0
- data/lib/falcon/verbose.rb +9 -2
- data/lib/falcon/version.rb +1 -1
- 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: ff2e7b8b6b71da71a61d98c6a832b98baa2d3e4748089f33f0eab99eca235052
|
4
|
+
data.tar.gz: 3e3da30dd2860e50be089be4e439e77fcb8d9e0e6c124e03ecee4876d3f72043
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ba139f77f0885560d055e364e35e443c3677f253fa49baf21450e9dedced20d237efdabf4da67e96311bfdac14097804e1d72ae67fe9c86a5cbb8f28aafce5a
|
7
|
+
data.tar.gz: 126664e2cbf082fac77f4eaf465710eb31c6c88a0a9b62abfea73aa13f469d24b7e1e839ab219ec97036720d657c7fd8b6521cd4647e8a0b02eb1ec3f74ecd65
|
data/lib/falcon/adapters/rack.rb
CHANGED
@@ -28,6 +28,7 @@ module Falcon
|
|
28
28
|
class Rack
|
29
29
|
def initialize(app, logger = Async.logger)
|
30
30
|
@app = app
|
31
|
+
|
31
32
|
@logger = logger
|
32
33
|
end
|
33
34
|
|
@@ -86,6 +87,7 @@ module Falcon
|
|
86
87
|
env['rack.hijack?'] = true
|
87
88
|
|
88
89
|
env['rack.hijack'] = lambda do
|
90
|
+
@logger.debug(request) {"Hijacking request..."}
|
89
91
|
env['rack.hijack_io'] = request.hijack
|
90
92
|
end
|
91
93
|
else
|
@@ -107,6 +109,7 @@ module Falcon
|
|
107
109
|
return nil
|
108
110
|
end
|
109
111
|
|
112
|
+
@logger.debug(request) {"Rack response: #{status} #{headers.inspect} #{body.class}"}
|
110
113
|
return Response.new(status, headers, body)
|
111
114
|
rescue => exception
|
112
115
|
@logger.error "#{exception.class}: #{exception.message}\n\t#{$!.backtrace.join("\n\t")}"
|
data/lib/falcon/verbose.rb
CHANGED
@@ -34,7 +34,10 @@ module Falcon
|
|
34
34
|
address = request.remote_address
|
35
35
|
|
36
36
|
@logger.debug(request.authority) {"#{request.method} #{request.path} #{request.version} from #{address.inspect}"}
|
37
|
-
|
37
|
+
|
38
|
+
# if ENV['REQUEST_HEADERS']
|
39
|
+
# @logger.debug(request.authority) {request.headers.inspect}
|
40
|
+
# end
|
38
41
|
|
39
42
|
task.annotate("#{request.method} #{request.path} from #{address.inspect}")
|
40
43
|
end
|
@@ -48,7 +51,11 @@ module Falcon
|
|
48
51
|
|
49
52
|
statistics.wrap(response) do |statistics, error|
|
50
53
|
@logger.info(request.authority) {"#{request.method} #{request.path} #{request.version} -> #{response.status}; #{statistics.inspect}"}
|
51
|
-
|
54
|
+
|
55
|
+
# if ENV['RESPONSE_HEADERS']
|
56
|
+
# @logger.info response.headers.inspect
|
57
|
+
# end
|
58
|
+
|
52
59
|
@logger.error(request.authority) {"#{error.class}: #{error.message}"} if error
|
53
60
|
end
|
54
61
|
|
data/lib/falcon/version.rb
CHANGED