-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Patch default strict slashes #900
Patch default strict slashes #900
Conversation
merge upstream master branch
@@ -111,7 +112,7 @@ def decorator(listener): | |||
|
|||
# Decorator | |||
def route(self, uri, methods=frozenset({'GET'}), host=None, | |||
strict_slashes=False, stream=False, version=None): | |||
strict_slashes=None, stream=False, version=None): |
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.
Instead of strict_slashes=None
I think it's better to do strict_slashes=self.strict_slashes
since it's more compact. What do you think?
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.
self
is not available at that moment i think.
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 understand your doubt but it seemed to work here: #896. I did the same type of thing a couple days ago when I made that, so should work :)
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.
yeah, it works in your case, because that is inside def route(self, ...)
, self
is available then.
def route(self, ...):
# blablabla
self.router.add(..., merge_routes=self.merge_routes)
Correct me if i am looking at wrong place.
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.
🤕 derp, good call
@@ -111,7 +112,7 @@ def decorator(listener): | |||
|
|||
# Decorator | |||
def route(self, uri, methods=frozenset({'GET'}), host=None, | |||
strict_slashes=False, stream=False, version=None): | |||
strict_slashes=None, stream=False, version=None): |
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.
🤕 derp, good call
Nice work, once again. Thanks for the help! |
@yunstanford final thing -- can you add this to the docs? Just a quick mention is all that's needed. |
Fix #897