Skip to content

How we should behave with uncompliant / bad header #6

Open

Description

@sbernard31

I think we should decide what we should do with uncompliant / bad header.

I know by the past "robustness principle" was preferred but I don't like to much the idea at least as default behavior.
I write my opinion about it in Leshan wiki : https://github.com/eclipse-leshan/leshan/wiki/How-Leshan-should-behave-with-Non-Compliant-Implementations-%3F

So I prefer a strict Compliance by default meaning that each unexpected format of data will raise an exception.
Or at very least will raise a log.
My preferred way would be raise an exception by default and eventually be able to configure (or override code) to let user log instead.

Here is some part of the code which lead to that kind of questions :

Activity

  1. changed the title [-]How we should be have with uncompliant / bad header[/-] [+]How we should behave with uncompliant / bad header[/+] on Nov 24, 2025
  2. bplessis-swi commented on Nov 24, 2025

    @bplessis-swi
    Contributor

    You and @cthirouin-swi were in agreement on this so the exception road was taken for tlv parsing.

  3. sbernard31 commented on Nov 24, 2025

    @sbernard31
    ContributorAuthor

    I think this also make sense to check the value of LOCAL command.

  4. sbernard31 commented on Nov 24, 2025

    @sbernard31
    ContributorAuthor

    (Not directly linked so let me know if you prefer a dedicated issue)
    But We could also discuss what should be the behavior if we receive a not supported format :
    See : #1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions