lib/restfulness/dispatchers/rack.rb in restfulness-0.2.1 vs lib/restfulness/dispatchers/rack.rb in restfulness-0.2.2

- old
+ new

@@ -18,15 +18,17 @@ protected def prepare_request(env) rack_req = ::Rack::Request.new(env) request = Request.new(app) + request.uri = rack_req.url request.action = parse_action(rack_req.request_method) request.query = rack_req.GET request.body = rack_req.body request.headers = prepare_headers(env) + # Useful info request.remote_ip = rack_req.ip request.user_agent = rack_req.user_agent # Sometimes rack removes content type from headers request.headers[:content_type] ||= rack_req.content_type