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

fix(api): 405 Method Not Allowed - False positive #208

Merged
merged 1 commit into from Dec 16, 2013

Conversation

kgriffs
Copy link
Member

@kgriffs kgriffs commented Dec 10, 2013

This patch removes the TypeError heuristic code altogether, since it
has been problematic in the past (and often masks app bugs).

BREAKING CHANGE: You can no longer overload a single resource class to
respond to multiple routes that differ by URI template params. This
has come to be viewed as an anti-pattern, and so it will no longer
be supported.

If you attempt to have a single OxResource that you try to overload to
respond to both, e.g., "PUT /oxen/old-ben" and "GET /oxen", it will
no longer work after this commit.

Developers should be advised to resist the temptation to overload their
resources; instead, create OxResource and OxenResource. It is common to
put these two classes in the same module.

@@ -12,14 +12,14 @@ This requires some discipline on the part of the developer.

### Misc. ###

* Falcon probably isn't thread-safe, so don't try it. Run multiple worker processes, each with a non-blocking I/O loop instead.
* Falcon has not been designed particularly to be thread-safe, so don't try it. Run multiple worker processes, each with a non-blocking I/O loop instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Falcon is not thread-safe. I suggest replacing the first sentence with this, while continuing to offer the advice in the second sentence.

Express more with less. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me do that. I noticed after the fact my mistake, but was being lazy. Thanks for the nudge. 👍

@queertypes
Copy link
Contributor

Just one documentation nit. Everything else LGTM.

This patch removes the TypeError heuristic code altogether, since it
has been problematic in the past (and often masks app bugs).

BREAKING CHANGE: You can no longer overload a single resource class to
    respond to multiple routes that differ by URI template params. This
    has come to be viewed as an anti-pattern, and so it will no longer
    be supported.

    If you attempt to have a single OxResource that you try to overload to
    respond to both, e.g., "PUT /oxen/old-ben" and "GET /oxen", it will
    no longer work after this commit.

    Developers should be advised to resist the temptation to overload their
    resources; instead, create OxResource and OxenResource. It is common to
    put these two classes in the same module.

Fixes Issue falconry#205
kgriffs pushed a commit that referenced this pull request Dec 16, 2013
fix(api): 405 Method Not Allowed - False positive
@kgriffs kgriffs merged commit 4961e6a into falconry:master Dec 16, 2013
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.

None yet

2 participants