lib/wunderbar/rack.rb in wunderbar-0.10.9 vs lib/wunderbar/rack.rb in wunderbar-0.11.0
- old
+ new
@@ -4,10 +4,14 @@
def call(env)
@_env = env
@_request = Rack::Request.new(env)
@_response = Rack::Response.new
Wunderbar.logger = @_request.logger
- Wunderbar::CGI.call(self)
+ if Wunderbar.safe? and $SAFE==0
+ Proc.new { $SAFE=1; Wunderbar::CGI.call(self) }.call
+ else
+ Wunderbar::CGI.call(self)
+ end
@_response.finish
end
# redirect the output produced
def out(headers,&block)