Refactor #find_endpoint from Router#process_request