Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResourceAdapter is broken #794

Closed
wants to merge 1 commit into from
Closed

ResourceAdapter is broken #794

wants to merge 1 commit into from

Conversation

klen
Copy link
Contributor

@klen klen commented Feb 20, 2016

For now, if we have any route which has been added from router.register_route, by example any StaticRoute then 404 URLs raise 405 (GET /unknown_url_404 --> 405!)

It happens because ResourceAdapter always returns allowed_methods. The PR fixes the problem.

@klen klen changed the title ResourceAdapter is broker ResourceAdapter is broken Feb 20, 2016
@@ -715,7 +716,7 @@ def test_resource_adapter_resolve_wildcard(self):
resource = route.resource
match_info, allowed = self.loop.run_until_complete(
resource.resolve('GET', '/path'))
self.assertEqual(allowed, {'*'}) # TODO: expand wildcard
self.assertEqual(allowed, set()) # TODO: expand wildcard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this TODO statement is useful no longer.

@klen
Copy link
Contributor Author

klen commented Feb 24, 2016

Does nobody care about the error? Actually, for now, AIOHTTP doesn't return 404 as well (for unknown resources). Is it normal?

@kxepal
Copy link
Member

kxepal commented Feb 24, 2016

@klen It could be not a problem. See webmachine flow for example. However, I'm not aware about the underlying idea.

cc @asvetlov

@drgarcia1986
Copy link

👍

@asvetlov
Copy link
Member

Guys, I'm traveling during last week. Will take a look after returning home.

@asvetlov
Copy link
Member

I don't that ResourceAdapter inherits Resource.

See #826 for proper fix

@asvetlov asvetlov closed this Mar 12, 2016
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants