-
Notifications
You must be signed in to change notification settings - Fork 299
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
Make StatusCode allow 600-999 #438
Conversation
You should describe the use-case for this. The addition of status codes with printable representations will increase the binary (rough estimate: 400 status codes * (3 bytes len + 8 bytes length indicator + align = 16bytes) = 6kB). I guess one could be proxying, where an upstream return an arbitrary 3-digit number, which is not bounded up to 599? |
Many cases have been cited in #144 . About size, I will try to make it compact. (3 * 900) = 2700, this will be smaller than it is now. |
@quininer @Matthias247 is there an update to getting this merged? I have a vested interest to get this merged and could try to pick this up if @quininer is unable to finish off the PR, but I don't want to step on any toes. |
I'd tentative consider merging, putting aside my strong feeling that servers shouldn't do this. I think the issue of added binary size is valid. I don't know a great way to fix that, perhaps |
I think size issue should not block this PR, because this PR has made size smaller than before. |
@seanmonstar @Matthias247 can we figure out what the next steps on this PR should be to get this merged? Is size an issue? @quininer made the size smaller than before, so I feel that any other improvements here should be left to a future PR. One thing to consider is folks who are trying to use this library in proxies where they have no control over what origins decide to return. I'd tentatively consider merging, putting aside my strong feeling that servers shouldn't do this. |
Close by #443 |
Also change
StatusCode
toNonZeroU16
, I think this will help performance.see https://rust.godbolt.org/z/1Evhbx