-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backwards compatibility with quoted object versions in CoRE Links #1270
Comments
There 2 kind of attribute version. The lwm2m version and the object version. For the first one there no issue as we know the LWM2M version used. For the object one, this is more complication has currently with the current code, we don't have access to the lwm2m version used. But this is a real question about :
So currently this is not the default behavior but this is possible. (maybe not easy enough to set ?) Why be strict by default, In a general way I try to explain this at (#1103 (comment) (see answer to ""how should we do that ?"") For this case, in particular we can discuss about it. By the way you find a little message issue 🕵️ , this should be ---Invalid lwm2m version "1.0" in </3>;ver="1.0" : version should not be quoted
+++Invalid object version "1.0" in </3>;ver="1.0" : version should not be quoted |
I think we should be more relaxed about that particular case and tolerate both quoted and unquoted object versions by default. In terms of adapting the code for this purpose, it couldn't be easier; you only need to change one line of code in protected boolean tolerateQuote() {
return false; //<-- change to true
} If we don't do that, we might actually lose a substantial number of big clients and vendors since Leshan would no longer be compatible. I know it's bending your rules a little bit, but please consider this option. |
My problem with tolerating this by default is that will hide potential implementation issue of LWM2M v1.1. 😞
I code it to let people changing it easy if needed. 🙂
I'm not sure to understand 🤔. Or I missed something ? |
The issue is that since M7, Leshan is no longer compatible out of the box with devices that use LwM2M 1.0, since the specification for that version didn't strictly describe the quote behavior. There actually are a lot of devices on the market and already in production that use LwM2M 1.0 (and quoted object versions), so by becoming more and more strict we lose compatibility with them. IMO we should be more permissive at least in this instance and tolerate quotes. |
I understand but as I explained above, there is no easy way for now to be strict for 1.1 and flexible for 1.0.
Not so true, we don't lost compatibility we just lost it out of the box. So all those devices can be used with Leshan.
In my experience, being flexible by default just hide the issues and then we find more more implementation with bad behavior. So I feel this is better to make life a bit more complicated for people we want the quote support for LWM2M v1.0 Note also that there is lot of specification issues which was raised about LWM2M v1.0 and was only fixed in LWM2M v1.1. So even for a LWM2M v1.0 device, I strongly advice to use quote ! Anyway to be more clear :
|
About
I fixed it in #1290. |
@JaroslawLegierski nobody complain about that for while now. So I don't know if we should try to fix that OR if finally everybody use quote now ? |
Yes - we can close this issue. |
Following the recent CoRE Link refactoring in #1197, we lost some backwards compatibility features, namely the server's ability to accept quoted object version values during Register and Discover. As an example, the following link fragment will not be accepted:
</3>;ver="1.0"
since it uses quotes around the version value (An error will be thrown: Invalid lwm2m version "1.0" in </3>;ver="1.0" : version should not be quoted).Lack of quotes is compliant with LwM2M 1.1, but in LwM2M 1.0 it was not defined and there are multiple implementations from well established vendors that use quotes, since in LwM2M 1.0 it didn't make a difference. To make Leshan compatible with devices that use the aforementioned standard, it would be useful to accept both version value styles, with and without quotes.
The text was updated successfully, but these errors were encountered: