What's Changed
Remove unnecessary mutating
behavior from Parameters.getCatchall()
by @gwynne in #130
Parameters.getCatchall()
has historically beenmutating
, 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 whensetCatchall()
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 becomemutating
, 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