Hi Martin,
thanks for pointing this subject.
>- Have I missed reading a specification that states that '&' is
<em>the</em> recognised separator of query parameters, or has Restlet
assumed
it as default and ignored others?
You're right there is no specification stating that '&' is the only
separator of query parameters. Restlet only conforms to a convention
that is generally observed, and unfortunately does not allow the use of
other separator.
It can be noticed also that no specification states that the
(name/value) pairs must be separated by the '=' character.
>- If in fact, other delimiters can legitimately be used; is it a
defect in Restlet that they are not recognised, or is it a 'feature'
that will remain?
I've entered an issue for that point =>
http://restlet.tigris.org/issues/show_bug.cgi?id=323
Best regards,
Thierry Boileau
I am investigating how best to construct URIs for my application set,
in particular the query part of a URI.
I have a query '?p1=x&p2=y+p3=m'. Using getQueryAsForm I get p1 and p2
in the form - p3 does not appear.
Using getQueryString I get 'p1=x&p2=y+p3=m'.
RFC 3986 defines '&' and '+' in the same production, as
reserved/sub-delimiters. I cannot find any reference to what
should be used as a parameter delimiter, although, of course, I
recognise that '&' is the most frequently used.
RFC 2396 also has nothing to say on this point.
My questions are:
- Have I missed reading a specification that states that '&' is
<em>the</em> recognised separator of query parameters, or has Restlet
assumed
it as default and ignored others?
- If in fact, other delimiters can legitimately be used; is it a
defect in Restlet that they are not recognised, or is it a 'feature'
that will remain?