Skip to content

Exposing more than 2 instances of the same thing generates duplicate URIs #1351

@derwehr

Description

@derwehr

When exposing multiple Things with the same title via the HTTP bindings, expose() invokes generateUniqueName here to append _2, and then does not check whether title_2 already exists.

Changing the if in http-server.ts#L272 to a while fixed this for me.

I.e:

while (this.things.has(urlPath)) {
    urlPath = Helpers.generateUniqueName(urlPath);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions