Update HttpStatusCode enum#26727
Conversation
| Unused = 306, | ||
| UpgradeRequired = 426, | ||
| UseProxy = 305, | ||
| Processing = 102, |
There was a problem hiding this comment.
Please add these new enum values in alphabetical ordering with the rest of them above.
There was a problem hiding this comment.
Nit: I agree the new codes should be integrated with the rest, but would it not make more sense for them to be ordered by numeric value rather than by name?
There was a problem hiding this comment.
It turns out that in the ref *.CS file, they are ordered alphabetically. This was an artifact with the old tooling (before the code was moved to GitHub). Other ref *.CS files follow this same pattern.
In the implementation *.CS file, they are ordered numerically.
| UnsupportedMediaType = 415, | ||
| RequestedRangeNotSatisfiable = 416, | ||
| ExpectationFailed = 417, | ||
| // Removed status code: ImATeapot = 418. |
There was a problem hiding this comment.
Instead of saying "Removed status code"...please add a comment describing why we aren't "adding" this status code. Please add the various links from the discussion thread on #4382.
There was a problem hiding this comment.
I.e. from the discussion thread...
It would be a mistake to add it to .NET now. See golang/go#21326, nodejs/node#14644, psf/requests#4238 and aspnet/HttpAbstractions#915
| LoopDetected = 508, | ||
|
|
||
| NotExtended = 510, | ||
| NetworkAuthenticationRequired = 511, |
There was a problem hiding this comment.
You can remove the "," at the end of this line since it is the last enum value.
* Update HttpStatusCode enum * address feedback Commit migrated from dotnet/corefx@504781c
Closes: #4382
/cc: @dotnet/ncl