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

Support non standard HTTP status codes #604

Open
boskos-q opened this issue May 7, 2024 · 1 comment
Open

Support non standard HTTP status codes #604

boskos-q opened this issue May 7, 2024 · 1 comment

Comments

@boskos-q
Copy link

boskos-q commented May 7, 2024

Description

So I found PR #334 that was closed, and I didn't wanted to "necro" it.
As mentioned in the comments there rfc7231 should be respected, but regardless that PR got declined?
In provided RFC it's mentioned:

 The status-code element is a three-digit integer code giving the
 result of the attempt to understand and satisfy the request.

 HTTP status codes are extensible.  HTTP clients are not required to
 understand the meaning of all registered status codes, though such
 understanding is obviously desirable.

RFC defines de-facto standard status codes and which are registered with IANA source. A side from those codes servers CAN return other status codes as well, but they must be 3 digits long, meaning that status codes 6xx, 7xx, 8xx, 9xx are also valid.
Checking PSR7, there is no clear definition that status codes >= 600 || <= 999 can't be supported, but rather just links to the previously mentioned RFC and IANA.
This is not respecting mentioned RFC fully, and is supporting only de-facto standard status codes while ignoring non standard, but RFC supported status codes.

Example

Just by googling a bit for status codes that are in "non supported range", you'll stumble upon multiple major service providers that uses them. Also some banking systems use those status codes as well to handle some edge cases while providing a reason phrase as well.

Additional context

By being one of the default packages used by major frameworks, and a lot of other packages as dependency, you make a big impact on how we develop our apps for the web. Having this limitation is really bad an having to do a workaround while having this package installed is just ..
By providing actual context in the description section, I strongly believe that mentioned PR should be re-opened and merged.

@boskos-q
Copy link
Author

@GrahamCampbell can I get your input on this? Thanks

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

No branches or pull requests

1 participant