lib/http/broker.rb in rsence-2.0.0.5.pre vs lib/http/broker.rb in rsence-2.0.0.6.pre
- old
+ new
@@ -1,7 +1,7 @@
#--
-## Riassence Framework
+## RSence
# Copyright 2008 Riassence Inc.
# http://riassence.com/
#
# You should have received a copy of the GNU General Public License along
# with this software package. If not, contact licensing@riassence.com
@@ -45,11 +45,13 @@
response = Response.new
request_method = request.request_method.downcase
dispatcher = dispatcher_class.new( request, response )
dispatcher.send(request_method)
content_type = dispatcher.content_type
+ # puts "encoding: #{response.body.encoding.inspect}"
response.header['Content-Length'] = response.body.length.to_s unless response.header.has_key?('Content-Length')
+ # puts [response.status, response.header, response.body].inspect
return [response.status, response.header, response.body]
end
def dispatcher_class
@dispatcher ||= Class.new(self.class) do
@@ -69,10 +71,12 @@
else
@@ping_sim = conf/1000.0
end
Thread.new do
Thread.pass
+ puts "testing port.. #{host.inspect}"
until RSence.argv.test_port( port, host )
+ puts "port tested"
sleep 0.1
end
@@transporter.online = true
end
handler.run( Rack::Lint.new(self.new), :Host => host, :Port => port )