On 15 May 2015, Moumita Ray made a change to iotivity that changes the
separator in query filters:
Changed ampersand '&' to semicolon ';' to concatenate multiple query string
This change set is based on OIC core framework standard specification draft
A.
Modified '&' to ';' to separate multiple filters in a query params.
Added necessary changes in the parser to validate and parse the query
including core framework, unit tests and sample.
The actual change supports both, so technically it *added* ';' rather than
changing it per se
(OC_QUERY_SEPARATOR is "&;"). However, the core framework doc says:
A query string shall contain a list of <name>=<value> segments (aka "name-value
pair") each separated by a ';' (semicolon). The query string will be mapped to
the appropriate syntax of the protocol used for messaging. (e.g., CoAP).
But that's in the section on "oic;" URIs not coap URIs. The core framework
document says nothing about any changes to segment separators in coap URIs, it
just references RFC 7252 (the coap RFC).
RFC 7252 sections 6.1, 6.4 and 6.5 make it clear that coap (and coaps) URIs
shall use (only) ampersand as the delimiter.
Thus the state of the OCF spec is that any code using oic: URIs (and there is
no such code...) would use semicolon, but the semicolons would be changed to
ampersands as a result of an oic: URI being "mapped to the appropriate syntax
of the protocol used for messaging", i.e., to a coap/coaps URI.
And the state of iotivity is that the server will accept either one because of
an iotivity-specific change to the forked libcoap code.
Since the change claims to have been done just for spec compliance which it
appears is no longer needed, is there any reason to retain the ';' in the code?
I'm asking because I'm working on unforking libcoap and would like to avoid
pushing non-RFC-compliant changes upstream.
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160728/602e9895/attachment.html>