Fork me on GitHub
#lambdaisland
<
2020-06-11
>
plexus09:06:05

I put out a new release of lambdaisland/uri, lambdaisland/uri {:mvn/version "1.4.49"}, it changes how assoc-query handles spaces, encoding them as "+" instead of "%20"

upside_down_parrot 1
plexus09:06:27

thanks to @daveliepmann for pointing this out. While "+" and "%20" are in a sense both "correct" encodings for a space in query strings, there is a semantic difference between the two. I looked at the built-in libraries for Ruby, Python and Java and they all use + so I think we should fall in line there. This is unfortunately a BREAKING change, although most consumers will treat both forms as equivalent.

plexus09:06:31

for the curious and as far as I understand it, '+' is a separator, '%20' is a regular character. I think a good analogy is shell quoting, compare echo "foo bar" vs echo "foo" "bar", the first form has a single argument containing a space, the second has two arguments. I think this is conceptually the same difference as foo%20bar vs foo+bar