Add new approved http status 451#697
Add new approved http status 451#697asvetlov merged 1 commit intoaio-libs:masterfrom sinwoobang:master
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? |
aiohttp/web_exceptions.py
Outdated
| 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.
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.