-
-
Notifications
You must be signed in to change notification settings - Fork 418
Description
In v0.18, query parameters were converted with toQueryParam and later encoded as part of renderQuery.
In v0.19, this was changed so that conversion and encoding of query parameters is done at once by toEncodedUrlPiece, and the parts are joined without doing extra encoding.
At first glance this seems like a good change since it allows more control over how encoding is done, but there's a subtlety:
The default implementation of toEncodedUrlPiece uses encodePathSegmentsRelative, which uses urlEncodeBuilder but with the first argument set to False
: i.e., denoting the input as a path element, not a query string.
So, when using servant "end to end" on the same API with String
or Text
query params, the server no longer gets what the client sent if any of the extra query special characters are present &=+$,
. I think this change wasn't intentional, thus this ticket.
I suppose a more correct change would be to add toEncodedQuery
or something to the class, but that's a much larger change.