Skip to content

Unexpected behavior when client omits Content-Type on resource creation #1256

Description

@bourgeoa

@RubenVerborgh

There is a code error in the new ressource-mapper.js

line 109 path += $${contentType in extensions ? .${extensions[contentType][0]} : '.unknown'}

should be (only one $) :

line 109 path += ${contentType in extensions ? .${extensions[contentType][0]} : '.unknown'}

The consequences are quite bad for all pods under NSS 5.1.6 (solid.community and dev.inrupt and all others) :

  • files are created with $.unknown at the end :

-- ressource test.txt => file test.txt$.unknown
-- or ressource index.html => file index.html$.unknown (app not working)

  • repair of the filesystem is needed, because if you only edit ressource-mapper-js, then when the bad files are edited the 2 above exemples are returned as ressources and files : test.txt.unknown and index.html.unknown (not usable)

  • Strangely the error never appear under the databrowser : ressource creation has the correct extension (tested with the actual ressource-mapper.js and a corrected one)

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