Skip to content

--mashlib should auto-enable --conneg #22

Closed

Description

@melvincarvalho

Problem

When using --mashlib or --mashlib-cdn, .ttl files (like Settings/Preferences.ttl) are stored internally as JSON-LD but mashlib expects them to be served as Turtle format.

Without explicitly adding --conneg, the raw JSON-LD is served with a .ttl extension, causing mashlib to fail with parse errors:

Strange: Error parse_error trying to read your preference file.
Fetcher: Error trying to parse <http://localhost:3000/melvin/Settings/Preferences.ttl> as Notation3:
SyntaxError: Line 5: Bad syntax: expected '.' or '}' or ']' at end of statement

Expected behavior

When --mashlib or --mashlib-cdn is enabled, content negotiation should be automatically enabled so .ttl files are converted from JSON-LD to Turtle on the fly.

Proposed fix

In src/config.js or bin/jss.js, automatically set conneg: true when mashlib is enabled:

if (config.mashlib || config.mashlibCdn) {
  config.conneg = true;
}

Workaround

Explicitly add --conneg when starting the server:

jss start --mashlib-cdn --idp --conneg

Activity

  1. added a commit that references this issue on Feb 24, 2026
    3534705
  2. added a commit that references this issue on Feb 24, 2026
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