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

Add new approved http status 451 #697

Merged
merged 1 commit into from
Mar 2, 2016
Merged

Add new approved http status 451 #697

merged 1 commit into from
Mar 2, 2016

Conversation

sinwoobang
Copy link
Contributor

Hi, I added new approved http status code 451.

Let me attach a link.

Thanks.

@kxepal
Copy link
Member

kxepal commented Dec 22, 2015

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.

@kxepal
Copy link
Member

kxepal commented Mar 1, 2016

Now it's official: http:https://tools.ietf.org/html/rfc7725

@sinwoobang
Copy link
Contributor Author

oh, thank you for notifying. @kxepal

@kxepal
Copy link
Member

kxepal commented Mar 1, 2016

@sinwoobang Will you update your PR?

@sinwoobang
Copy link
Contributor Author

Sure :) @kxepal

@sinwoobang
Copy link
Contributor Author

@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:
Copy link
Member

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.

@kxepal
Copy link
Member

kxepal commented Mar 1, 2016

LGFM, though I would squash everything into single commit for clean history.
@asvetlov, is it ok for you?

1 similar comment
@kxepal
Copy link
Member

kxepal commented Mar 1, 2016

LGFM, though I would squash everything into single commit for clean history.
@asvetlov, is it ok for you?

@sinwoobang
Copy link
Contributor Author

@kxepal Let me make a new PR if you want .

@kxepal
Copy link
Member

kxepal commented Mar 1, 2016

@sinwoobang no need. git push -f after rebase on the same branch will update related PR.

@asvetlov
Copy link
Member

asvetlov commented Mar 1, 2016

I would like to have a trivial test that checks .link and .headers['Link']

@sinwoobang
Copy link
Contributor Author

What's that error? CI occurs flake8 error but codes are same with previous.

@sinwoobang
Copy link
Contributor Author

@asvetlov I added a simple test case.

@asvetlov
Copy link
Member

asvetlov commented Mar 2, 2016

Cool. flake8 was updated, I'll fix it in separate commit.

asvetlov added a commit that referenced this pull request Mar 2, 2016
Add new approved http status 451
@asvetlov asvetlov merged commit dfaa747 into aio-libs:master Mar 2, 2016
@asvetlov
Copy link
Member

asvetlov commented Mar 2, 2016

Thanks!

@kxepal
Copy link
Member

kxepal commented Mar 2, 2016

\o/

@sinwoobang
Copy link
Contributor Author

👍

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants