-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(header): Support arbitary status codes #303
Conversation
There were the following issues with your Pull Request
Guidelines are available at https://github.com/hyperium/hyper/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
NetworkAuthenticationRequired, | ||
|
||
/// A method not in the IANA HTTP status code registry. | ||
UnregisteredStatusCode(u16), |
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.
Since it's already got the StatusCode namespace, I'd leave this as just 'Unregistered'.
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.
agreed
Test failure was in a doctest, that |
@pyfisch any news here? We'd like to land this to unblock servo/servo#117. |
You mean servo/servo#4246 :) |
Wow I have no idea what I was looking at. |
As discussed in #177 hyper must support status code outside the standard range for compatibility reasons. BREAKING CHANGE: This removes unregistered status codes from the enum. Use `FromPrimitive` methods to create them now. StatusCode and StatusClass can no longer be casted to `u16`, use `ToPrimitive` methods now. For example `status.to_u16().unwrap()` to get the status code number.
If anything is left to do tell me. |
I fixed up a couple tiny nits, and pushed this as #311 |
As discussed in #177 hyper must support status code outside the standard range for compatibility reasons.
BREAKING CHANGE: This removes unregistered status codes from the enum. Use FromPrimitive methods to create them now.
StatusCode and StatusClass can no longer be casted to u16, use ToPrimitive methods now.
For example
status.to_u16().unwrap()
to get the status code number.