class HttpRouter

@private
HttpRouter adapter
#

def process_destination_path(path, env)

def process_destination_path(path, env)
  Thread.current['padrino.instance'].instance_eval do
    request.route_obj = path.route
    @_response_buffer = nil
    @route    = path.route
    @params ||= {}
    @params.update(env['router.params'])
    @block_params = if match_data = env['router.request'].extra_env['router.regex_match']
      params_list = match_data.to_a
      params_list.shift
      @params[:captures] = params_list
      params_list
    else
      env['router.request'].params
    end
    # Provide access to the current controller to the request
    # Now we can eval route, but because we have "throw halt" we need to be
    # (en)sure to reset old layout and run controller after filters.
    original_params = @params
    parent_layout   = @layout
    successful      = false
    begin
      filter! :before
      (@route.before_filters - settings.filters[:before]).each { |block| instance_eval(&block) }
      @layout = path.route.use_layout if path.route.use_layout
      @route.custom_conditions.each { |block| pass if block.bind(self).call == false } if @route.custom_conditions
      halt_response     = catch(:halt) { route_eval { @route.dest[self, @block_params] } }
      @_response_buffer = halt_response.is_a?(Array) ? halt_response.last : halt_response
      successful        = true
      halt halt_response
    ensure
      (@route.after_filters - settings.filters[:after]).each { |block| instance_eval(&block) } if successful
      @layout = parent_layout
      @params = original_params
    end
  end
end

def rewrite_partial_path_info(env, request); end

def rewrite_partial_path_info(env, request); end

def rewrite_path_info(env, request); end

def rewrite_path_info(env, request); end