Skip to content

Commit 75dff9b

Browse files
committed
fix(spell): correct regex for status code pattern matching
- Updated `StatusCode.pattern` and `StatusCode.regExp` to match only valid HTTP status codes (100–599) instead of any three-digit number.
1 parent aee7bc0 commit 75dff9b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Once the Dart MCP server implements the proposal, agents will automatically have
2121

2222
- Fixed: `maybeMapStatusCode` now performs the `null` check before calling `toRegisteredStatusCode()`, which was previously invoked unnecessarily for `null` inputs.
2323
- Fixed: `StatusCode.random()` no longer wraps the source iterable in an intermediate `List.unmodifiable(...)` just to call `elementAt`. The allocation was unnecessary since `Iterable.elementAt` works directly.
24-
- Fixed: `StatusCode.pattern` (and `StatusCode.regExp`) now matches only the valid HTTP status code range (`[1-5]\d{2}`, i.e. 100599) instead of any three-digit number (`\d{3}`). This avoids false matches on strings like `"timeout after 999ms"`. Note: `tryParse` behaviour is unchanged for all registered codes — only the raw pattern/regex changes.
24+
- Fixed: `StatusCode.pattern` (and `StatusCode.regExp`) now matches only the valid HTTP status code range (`[1-5]\d{2}`, i.e. 100-599) instead of any three-digit number (`\d{3}`). This avoids false matches on strings like `"timeout after 999ms"`. Note: `tryParse` behavior is unchanged for all registered codes — only the raw pattern/regex changes.
2525
- Fixed: `values` doc comment count corrected from 95 to 93.
2626

2727
### Documentation

0 commit comments

Comments
 (0)