Code Monkey home page Code Monkey logo

Comments (5)

cdewbery avatar cdewbery commented on May 22, 2024

Hi Piotrek,

Thank you for the detailed report.

During our compatibility testing we found that this particular case was not handled very consistently across various implementations. We ended up settling on plain text, as I think this may have been listed as the default at one stage in one of the many revisions of the specification(although don't quote me on that). I think your idea to be able to set the default content type is a great idea and would allow for better compatibility with the likes of Leshan.

Chris.

from awalwm2m.

DavidAntliff avatar DavidAntliff commented on May 22, 2024

We have an option on the server to set the default content encoding type - would it be useful to add a similar option to the client?

Note that during the January 2016 TestFest, it was decided that the content type must be specified in all requests, and that the standard will be updated to say so, so once the spec is finally published as 1.0 "final" and Leshan is updated, the problem should diminish.

from awalwm2m.

delmet avatar delmet commented on May 22, 2024

I have tried testing change against leshan.eclipse.org to confirm fix but not seeing issue. As it always seems to provide either accept or content format header.

from awalwm2m.

pstolarz avatar pstolarz commented on May 22, 2024

You wont see any difference between the versions w/ and w/o your fix, since the fix is incomplete - see my comment for #258. After applying my patch, launch awa_clientd w/o -t option. Then look into your registered client via the web interface in the leshan demo server and try to read a whole instance of any object. You will get an alert in leshan like this one:

Unable to read instance /1/0 for pstolarz : 500 Client [pstolarz] returned unexpected response code [2.00]

and

[ERROR] Serialiser not found for type 0

on the awa_client side.

Next launch the client with -t 1542 (or any other type supporting full serialization) and everything will work fine.

BTW: Why not to use application/vnd.oma.lwm2m+tlv encoding (1542) as the defualt one? Less problems in the future.

And thanks for the blitz response and fix. Impressive...

from awalwm2m.

pstolarz avatar pstolarz commented on May 22, 2024

@delme-imgtec Indeed, checking today's version of leshan.eclipse.org it looks like they provided a new version which always sends a content type for requests. See their yesterday change:

eclipse-leshan/leshan@86295f9

Looks like they use 1542 type from now. The change was introduced 23 hours ago, so yesterday I worked with an old version and today they upgraded the server.

On my development version (leshan-0.1.11-M12 - still the latest tag) the problem exists.

from awalwm2m.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.