-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add new approved http status 451 #697
Conversation
Technically, it's still a draft without official RFC number. Also, you need to implement Link header support as it should be provided. See responses for 3xx statuses for an example. |
Now it's official: http://tools.ietf.org/html/rfc7725 |
oh, thank you for notifying. @kxepal |
@sinwoobang Will you update your PR? |
Sure :) @kxepal |
@kxepal I implemented Link header support. Would you check this? |
body=None, text=None, content_type=None): | ||
super().__init__(headers=headers, reason=reason, | ||
body=body, text=text, content_type=content_type) | ||
if not link: |
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.
When an entity blocks access to a resource and returns status 451, it
SHOULD include a "Link" HTTP header field [RFC5988] whose value is a
URI reference [RFC3986] identifying itself. When used for this
purpose, the "Link" header field MUST have a "rel" parameter whose
value is "blocked-by".
It's optionally strongly recommended value, but not mandatory one.
LGFM, though I would squash everything into single commit for clean history. |
1 similar comment
LGFM, though I would squash everything into single commit for clean history. |
@kxepal Let me make a new PR if you want . |
@sinwoobang no need. |
I would like to have a trivial test that checks |
What's that error? CI occurs flake8 error but codes are same with previous. |
@asvetlov I added a simple test case. |
Cool. flake8 was updated, I'll fix it in separate commit. |
Add new approved http status 451
Thanks! |
\o/ |
👍 |
Hi, I added new approved http status code 451.
Let me attach a link.
Thanks.