-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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.
Does nobody care about the error? Actually, for now, AIOHTTP doesn't return 404 as well (for unknown resources). Is it normal? |
@klen It could be not a problem. See webmachine flow for example. However, I'm not aware about the underlying idea. cc @asvetlov |
👍 |
Guys, I'm traveling during last week. Will take a look after returning home. |
I don't that See #826 for proper fix |
For now, if we have any route which has been added from
router.register_route
, by example anyStaticRoute
then 404 URLs raise 405 (GET /unknown_url_404 --> 405!
)It happens because ResourceAdapter always returns
allowed_methods
. The PR fixes the problem.