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

Additional HTTP Status Codes #1372

Merged
merged 2 commits into from
Nov 10, 2014

Conversation

marinewater
Copy link
Contributor

HTTP Status codes from RFC 6585,
Especially 429 - Too Many Requests is pretty useful for APIs, I think it is worth including.
I did not implement 511 - Network Authentication Required because it is

for use by intercepting proxies that are interposed as a means of controlling access to the network.

@mmerickel
Copy link
Member

+1 LGTM

mmerickel added a commit that referenced this pull request Nov 10, 2014
@mmerickel mmerickel merged commit 04d2a1d into Pylons:master Nov 10, 2014
@mmerickel
Copy link
Member

Thanks for the new codes!

@jvanasco
Copy link
Contributor

Any idea when 1.5.3 will come out? I was actually just needing this feature myself.

@mmerickel
Copy link
Member

As a new feature I hadn't intended to put this in the 1.5 series.

@jvanasco
Copy link
Contributor

Ok. thanks for the fast reply. I'll just have our deployscript apply this as a patch for now.

@digitalresistor
Copy link
Member

@jvanasco Unless you specifically need the Exceptions, you can already set these status codes on a response and WebOb will correctly send out the correct information.

@jvanasco jvanasco mentioned this pull request Nov 12, 2014
@jvanasco
Copy link
Contributor

Thanks. Unfortunately, I needed to raise an Exception because the existing code relies on httpexceptions.exception_response (which looks up the numeric code in the httpexceptions.status_map). It would be a bit of work to change our code, and this is coming down the pipeline.

I should bring up an idea I had though for making the exceptions a bit more extensible. I'll propose that in a new ticket.

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.

4 participants