lib/plezi/handlers/http_router.rb in plezi-0.7.5 vs lib/plezi/handlers/http_router.rb in plezi-0.7.6
- old
+ new
@@ -48,21 +48,21 @@
if request[:host_name] && hosts[request[:host_name].to_s.downcase]
hosts[request[:host_name].downcase].on_request request
elsif hosts[:default]
hosts[:default].on_request request
else
- HTTPResponse.new( request, 404, {"content-type" => "text/plain", "content-length" => "15"}, ["host not found."]).finish
+ HTTPResponse.new( request, 404, {'content-type' => 'text/plain', 'content-length' => '15'}, ['host not found.']).finish
end
request.service.timeout = 5
end
# handles requests send by Rack - dresses up as Middleware, for Rack (if you're don't like WebSockets, go ahead...)
def call env
- if env["HOST"] && hosts[env["HOST"].downcase]
- hosts[env["HOST"].downcase].call env
+ if env['HOST'] && hosts[env['HOST'].downcase]
+ hosts[env['HOST'].downcase].call env
elsif hosts[:default]
hosts[:default].call env
else
- [404, {"content-type" => "text/plain", "content-length" => "15"}, ["host not found."] ]
+ [404, {'content-type' => 'text/plain', 'content-length' => '15'}, ['host not found.'] ]
end
end
end
end