lambdaisland

plexus 2020-06-11T09:09:05.105600Z

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"

1
plexus 2020-06-11T09:11:27.107700Z

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.

plexus 2020-06-11T09:13:31.109800Z

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