-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Ability to keep the same form of URI segments after decoding/encoding, as originally given #257
Comments
We did get this request before (for similar reasons), but so far the approach you took is the only one available. I'm not sure if retaining the originally-encoded segments would be possible to implement in a binary-compatible way, but maybe. So let's keep this open until somebody tries :) |
I have same issue with UriInterpolator attempting to decode part of URL which which is not originally encoded (just contains % character) or was already decoded. Sample URL Stack trace
|
@zikolach I think that should be a separate issue - to fix the parsing of already-decoded URIs. |
Though the title here might have been a bit misleading - I updated it to reflect the description |
Hi.
I've got rather peculiar case, when I needed for an url to retain in exactly the same way, as it was in the string, because some parts of it are signed. The url contains things like
%3D
instead of=
, etc. When the url is parsed by sttp these things are decoded, and when the request is sent using such Url instance - the url is technically the same from the http standards point of view, but the signature is no longer valid.I solved this by playing with
.pathSegmentsEncoding
and.querySegmentsEncoding
, so the url was exactly same when sending the request. But the url string is comming from an external API, so I can not be sure, that the url encoding they use would remain the same over time and thing would not break.Wouldn't it be nice to be able to parse string to Url, bit retain whatever encoding was there? I.e. validate such escapes, but do not decode them. Not a piece of cake though, since we need to retain such infomation somewhere in Url, not to encode such escapes second time when rendering (or
%3D
would turn into%253D
).The text was updated successfully, but these errors were encountered: