routing-kit

4.9.1

🚍 High-performance trie-node router.
vapor/routing-kit

What's New

4.9.1 - Remove unnecessary `mutating` behavior from `Parameters.getCatchall()`

2024-05-05T21:49:41Z

What's Changed

Remove unnecessary mutating behavior from Parameters.getCatchall() by @gwynne in #130

Parameters.getCatchall() has historically been mutating, in order to delay the removal of percent encoding from matched catchall values until it is called for the first time. This was an unnecessary optimization which just adds confusion to the behavior of the API and makes it harder to use. We now remove the percent encoding immediately when setCatchall() is called instead.

Additional changes:

  • Minimum Swift version updated to 5.8
  • set(_:to:) now falls back to the original value if removing percent encoding fails, matching the existing behavior of the catchall logic. This should have no impact in real systems, as an invalid input of this kind should never reach the routing logic.

(N.B.: While it is an API break for a previously non-mutating method to become mutating, the reverse is not the case, so this is a patch-level change.)

This patch was released by @gwynne

Full Changelog: 4.9.0...4.9.1

RoutingKit

Documentation Team Chat MIT License Continuous Integration Swift 5.8+


Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Sat Nov 23 2024 16:41:57 GMT-1000 (Hawaii-Aleutian Standard Time)