lib/http/broker.rb in rsence-2.0.0.1.pre vs lib/http/broker.rb in rsence-2.0.0.2.pre
- old
+ new
@@ -64,32 +64,32 @@
def self.included(receiver)
receiver.extend( SingletonMethods )
end
def not_found
- puts "/404: #{@request.fullpath.inspect}" if $DEBUG_MODE
+ puts "/404: #{@request.fullpath.inspect}" if RSence.args[:verbose]
@response.status = 404
err404 = '<html><head><title>404 - Page Not Found</title></head><body>404 - Page Not Found</body></html>'
@response['content-type'] = 'text/html; charset=UTF-8'
@response['content-length'] = err404.length.to_s
@response.body = err404
end
## Post requests are always xhr requests
def post
- puts "post: #{@request.fullpath}" if $DEBUG_MODE
+ puts "post: #{@request.fullpath}" if RSence.args[:verbose]
sleep @@ping_sim if @@ping_sim
not_found unless @@transporter.servlet( :post, @request, @response )
end
## Get requests are different, depending on the uri requested
def get
- puts "get: #{@request.fullpath}" if $DEBUG_MODE
+ puts "get: #{@request.fullpath}" if RSence.args[:verbose]
sleep @@ping_sim if @@ping_sim
not_found unless @@transporter.servlet( :get, @request, @response )