You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just stumbled upon a small problem with spaced encoded in query string parameters of IRI Template routes
Spaces in query can be encoded as %20 or +. In the latter case, it appears that they are not decoded by hydra-box but the plus sign is preserved in the value.
Here is the diff that solved my problem. At first I thought that the problem was in using req.params and not req.query but I assume that it could not, since a template variable can also be a segment? (is that actually supported, I don't remember). Thus, for now I added a replacer so that + does become a space but only when the given key is in fact a query string param.
Let me know if you think that the improvement should actually be in using req.query...
I just stumbled upon a small problem with spaced encoded in query string parameters of IRI Template routes
Spaces in query can be encoded as
%20
or+
. In the latter case, it appears that they are not decoded by hydra-box but the plus sign is preserved in the value.Here is the diff that solved my problem. At first I thought that the problem was in using
req.params
and notreq.query
but I assume that it could not, since a template variable can also be a segment? (is that actually supported, I don't remember). Thus, for now I added a replacer so that+
does become a space but only when the given key is in fact a query string param.Let me know if you think that the improvement should actually be in using
req.query
...This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: