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

Update HTTP status code constants wrt RFC 9110 #2276

Closed
vytas7 opened this issue Aug 17, 2024 · 17 comments · Fixed by #2330
Closed

Update HTTP status code constants wrt RFC 9110 #2276

vytas7 opened this issue Aug 17, 2024 · 17 comments · Fixed by #2330
Labels
bug good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! maintenance
Milestone

Comments

@vytas7
Copy link
Member

vytas7 commented Aug 17, 2024

Update our HTTP status code constants (in falcon/status_codes.py) to conform to RFC 9110.

While we should be largely up-to-speed, there is at least one known inaccuracy wrt 413 Content Too Large (see RFC 9110, Section 15.5.14). We still use the older Payload Too Large.

@vytas7 vytas7 added bug good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks! maintenance labels Aug 17, 2024
@vytas7 vytas7 added this to the Version 4.0 milestone Aug 19, 2024
@VibhinnS
Copy link

Hi. I saw the RFC spec sheet and there are a lot of HTTP codes that are removed, one has been reserved and one new code is added. Should I remove their references from status.rst file and falcon __init__ file as well?

I'm quite new to this so wanted to confirm. Thanks

@vytas7
Copy link
Member Author

vytas7 commented Aug 25, 2024

Hi @VibhinnS, by saying a lot of, could you give any specific examples?
Yes, it might be helpful to list these codes you are planning to change here before you start 🙂

Otherwise please see the abandoned #2279 for a checklist what needs to be done in this issue (bar the specific error codes).

@VibhinnS
Copy link

VibhinnS commented Aug 25, 2024

yeah sure

HTTP 207, 208, 226, 423, 424, 428, 429, 431, 451, 507, 508, 511 aren't mentioned in the RFC spec sheet (not sure if that means they're not standardized yet or won't be used at all as per 9110)
HTTP 418 is reserved now.

one new HTTP 421 has been added that's not in the current codebase

thanks for your help.

@vytas7
Copy link
Member Author

vytas7 commented Aug 25, 2024

Let me check. Just a quick comment, we should keep HTTP 418; it is not standardized and has never been (it has only been proposed as an April Fools joke), but it is included for fun in many libraries.

@vytas7
Copy link
Member Author

vytas7 commented Aug 25, 2024

You can also check HTTP response status codes on MDN, some of them are specific to WebDAV. We do support WebDAV methods and status codes. It is a valid question whether we should, but I don't think we want to remove them now.

@VibhinnS
Copy link

okay - got this. I'm keeping all the response codes untouched that're WebDAV specific.

@vytas7
Copy link
Member Author

vytas7 commented Aug 25, 2024

Let's not remove any status codes at all, they are probably there for a reason (be it another spec such as WebDAV, or pure fun 😈). Or if you find any that you propose to remove, explain here why.

Re HTTP 421 -- let's add it -- well spotted!

@VibhinnS
Copy link

aye aye captain

@vytas7
Copy link
Member Author

vytas7 commented Aug 28, 2024

Hi again @VibhinnS, just checking if you are still working on this issue, and do you need any help?

@aarcex3
Copy link
Contributor

aarcex3 commented Sep 11, 2024

Hi, can I take this one if it's still open?

@vytas7
Copy link
Member Author

vytas7 commented Sep 12, 2024

Hi @aarcex3 !
Yes, go ahead! (We haven't heard from @VibhinnS since.)

@vytas7 vytas7 removed the needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks! label Sep 12, 2024
@VibhinnS
Copy link

Hi @vytas7! Sorry for being inactive - had interviews and my grandma died 2 weeks ago, so I went off the grid for some time.
Do you mind if I stay in the community and work on another issue?

@CaselIT
Copy link
Member

CaselIT commented Sep 12, 2024

Sorry to hear...
Sure feel free to pick any issue you like, thanks!

@vytas7
Copy link
Member Author

vytas7 commented Sep 12, 2024

Ouch, sad to hear that @VibhinnS 🖤

And no worries at all, you don't owe us anything, come and contribute whenever you like 👍

@aarcex3
Copy link
Contributor

aarcex3 commented Sep 12, 2024

@VibhinnS Im very sorry for your lost.

@aarcex3
Copy link
Contributor

aarcex3 commented Sep 12, 2024

@vytas7 question, which link should I use as source? The one from MDN (it has more info) or the one from datatracker, since is the one on the issue description?

@vytas7
Copy link
Member Author

vytas7 commented Sep 12, 2024

@aarcex3 They shouldn't really contradict each other, MDN also includes other RFCs such as WebDAV (which we also include). I don't think we are looking to remove any codes either, let's add the missing ones and sync existing ones according to RFC 9110.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! maintenance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants