- Support ipv6 literals
query-map
/query-string->map
: when called with an:into
collection, and no query params are present, then return the:into
collection, rather thannil
. If no explicit:into
collection is provided, then retain the existing behavior of returningnil
on blank input.
- Added functions for dealing with query strings as positional collections:
query-string->seq
,seq->query-string
.
query-map
/query-string->map
: return:into
value on blank input
- Do not truncate value of a query parameter pair when contains nested
=
characters
- Adds
:into
option to define customclojure.lang.IPersistentMap
target data structure forlambdaisland.uri/query-string->map
- Treat a backslash in the authority section as a delimiter which starts the path section (CVE-2023-28628, with thanks to @luigigubello for the report)
- Fix a stack overflow in
normalize/char-seq
for really large query parameter values
- Support
toString
on Babashka (requires recentbb
)
- Fixed an issue in
lambdaisland.uri.normalize/normalize-query
which did not take into account utf-16 encoding.
lambdaisland.uri.normalize/normalize
now also normalizes the fragment.
uri-str
as an explicitlambdaisland.uri.URI
to string conversion
- Fixed compatibility with Babashka/SCI. Note that on babashka we can't
implement IFn or toString, so converting a
URI
back to a string needs to be done explicitly withuri-str
, and it is not possible to use a URI as a function. ((:path uri)
is ok,(uri :path)
is not).
- Add
uri?
predicate.
- Make query decoding handle
+
as space, so the conversion between maps and query strings correctly round trips. - Handle percent encoding of control characters (codepoints < 16)
- make
lambdaisland.uri.platform/string->byte-seq
return unsigned bytes on both plaforms (clj/cljs)
- Make
assoc-query
/query-encode
encode spaces as "+" rather than "%20", which brings it in line to how most languages/libraries do it.
- Added function for dealing with query strings as maps:
query-string->map
,map->query-string
,query-map
,query-encode
,assoc-query
,assoc-query*
.
- Fix query string normalization, for delimiter characters like
=
and+
there is a semantic difference between the encoded and decoded form, when they are encoded in the input normalization should not decode them and vice versa
- Remove dependencies on ClojureScript and data.json.
lambdaisland.uri.normalize/normalize
, for normalizing URI instances.
- Added type hints to avoid reflection (thanks @totakke!)
- Predicate functions
absolute?
andrelative?
- Initial release, public vars:
uri
,join
,coerce
,parse
,edn-readers