Skip to content

Charsets not handled with contentTypes #15

@melvincarvalho

Description

@melvincarvalho

It seems in many cases contentType contains a charset :

https://www.w3.org/International/articles/http-charset/index

However this would appear to break node-webid with a rather cryptic error message. This means that many webids will fail to log in to an unpatched node solid server, leading to inconsistent behaviour and possible user frustration

Possible code to fix may be along the lines of :

if (mimeType && mimeType.length) {
  mimeType = mimeType.split(';')[0]
}

At : https://github.com/linkeddata/node-webid/blob/master/lib/parse.js#L7

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