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

Implicit branches cause incorrect routes to be used when methods should not be allowed. #12

Merged
merged 5 commits into from
Feb 27, 2013

Conversation

dreid
Copy link
Contributor

@dreid dreid commented Feb 26, 2013

See https://gist.github.com/dreid/5041647

In this case a request to DELETE /collections/<colname>/<itemname> falls through until it gets to delete_collection_branch.

This is bad, what should be a 405 Method not Allowed, results in a successful delete of the collection.

@cyli
Copy link
Member

cyli commented Feb 26, 2013

The docstring for test_app.test_branchroute probably needs an update to be that the branch=True option is passed.

Also, should there be a second test case to make sure that whether or not the trailing slash is added, if a branch=True option is passed the implicit branch will be created? Or would that be overkill?

@cyli
Copy link
Member

cyli commented Feb 26, 2013

That part of README.rst above where you added branch=True should probably also be updated. Currently it says "If the URL passed to route ends in a / then the returned IResource will also be allowed to handle all children path segments."

dreid added a commit that referenced this pull request Feb 27, 2013
Implicit branches cause incorrect routes to be used when methods should not be allowed.
@dreid dreid merged commit fbe83db into master Feb 27, 2013
@wsanchez wsanchez deleted the remove-implicit-branches branch December 9, 2016 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants