Ability to keep the same form of URI segments after decoding/encoding, as originally given
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by tracing how strings are parsed into Url and how pathSegmentsEncoding and querySegmentsEncoding affect rendering. Check where decoded segments are stored and encoded again when sending a request. Done means valid percent escapes can retain their original representation without being decoded or double-encoded, including signed URLs.
Written by the indexing model from the issue text.
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).
- Dominant language
- Scala
- Stars
- 45
- Forks
- 33
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from softwaremill/sttp-model
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
softwaremill/sttp-model#310 ·
-
v2
Difficulty 5/5 Over a week Newbie friendliness 25/100
softwaremill/sttp-model#211 · 1 comment ·
-
v2
Difficulty 1/5 Under an hour Newbie friendliness 45/100
softwaremill/sttp-model#174 ·
All issues in softwaremill/sttp-model
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ergoplatform/ergodocs#614 ·
-
area:ci enhancement requires-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/datafusion-comet#6078 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
[VL] madvise(WILLNEED) call fails in MmapFileStream because of wrong calculation of fetching length Openbug triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
chipsalliance/rocket-chip#3831 ·