Conversation
| { | ||
| context.Enter(key); | ||
|
|
||
| if (key != "default" && !Regex.IsMatch(key, "^[1-5|X][0-9|X][0-9|X]$")) |
There was a problem hiding this comment.
The spec is kinda ambiguous here on whether XXX is allowed. I can see that the intention is probably "not allowed" - since "default" is created for that purpose. However, the exact wording of the spec itself does not make it crystal clear which digits the wildcard X can be used in.
To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. The following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response range is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
There was a problem hiding this comment.
I submitted a PR to the spec to clarify the wording. Does this help?
There was a problem hiding this comment.
Yup. That helps. I'll fix my code
Fix #214, Fix #57