Kitura / Kitura-net

Kitura networking
Apache License 2.0
104 stars 79 forks source link

HTTPStatusCode enum is missing registered values #305

Open djones6 opened 5 years ago

djones6 commented 5 years ago

The public enum HTTPStatusCode is missing a number of values that are registered with IANA: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

The ones that I spotted are:

There may be others missing - it would be worth comparing against the IANA list.

Whilst adding cases to this public enum is technically a breaking change, we do not realistically expect someone to exhaustively switch over it (ie. without a default case), and so we feel this is a reasonable change to make as a bug fix.

This change needs to be made to both Kitura-net and Kitura-NIO.

pushkarnk commented 5 years ago

Looks like too early (425) doesn't exist in SwiftNIO's HTTPResponseStatus