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

feat(header): Support arbitary status codes #303

Closed
wants to merge 1 commit into from
Closed

feat(header): Support arbitary status codes #303

wants to merge 1 commit into from

Conversation

pyfisch
Copy link
Contributor

@pyfisch pyfisch commented Feb 8, 2015

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.

@GitCop
Copy link

GitCop commented Feb 8, 2015

There were the following issues with your Pull Request

  • Commit: c14bffb
    • Your commit message body contains a line that is longer than 100 characters

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),
Copy link
Member

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'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

@seanmonstar
Copy link
Member

Test failure was in a doctest, that StatusCode wasn't imported.

@reem
Copy link
Contributor

reem commented Feb 13, 2015

@pyfisch any news here? We'd like to land this to unblock servo/servo#117.

@Manishearth
Copy link
Contributor

You mean servo/servo#4246 :)

@reem
Copy link
Contributor

reem commented Feb 13, 2015

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.
@pyfisch
Copy link
Contributor Author

pyfisch commented Feb 13, 2015

If anything is left to do tell me.

@seanmonstar
Copy link
Member

I fixed up a couple tiny nits, and pushed this as #311

@pyfisch pyfisch deleted the status branch February 14, 2015 10:03
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

Successfully merging this pull request may close these issues.

5 participants