FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Conneg ignores Accept header priority · Issue #71 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub

Repository navigation

Conneg ignores Accept header priority #71

Closed

Description

Summary

Content negotiation returns text/turtle regardless of the order specified in the Accept header.

Steps to Reproduce

curl -I 'https://example.com/' -H 'Accept: application/ld+json, text/turtle, application/json'

Expected: Content-Type: application/ld+json (first in list)

Actual: Content-Type: text/turtle

Workaround

Request only the desired type:

curl -I 'https://example.com/' -H 'Accept: text/html'

This correctly returns Content-Type: text/html.

Impact

Environment

  • JSS v0.0.75

Activity

  1. melvincarvalho commented on Jun 10, 2026

    ContributorAuthor

    Findings (2026-06-10): verified fixed — closing

    Live-verified against current gh-pages (jss --conneg --public, JSON-LD resource at /public/test.jsonld):

    GET with… Returns
    Accept: application/ld+json, text/turtle, application/json (this issue's case) application/ld+json ✅
    Accept: text/turtle, application/ld+json text/turtle ✅
    Accept: application/ld+json;q=0.5, text/turtle text/turtle ✅ (q-weights honored)

    The fix landed via #325 (April 2026): parseAcceptHeader in src/rdf/conneg.js now parses q-values and sorts descending (stable sort preserves listed order for equal q), and selectContentType returns the first supported type. The behaviour reported here — Turtle returned regardless of Accept order — can't reproduce on GET.

    Two adjacent gaps surfaced during verification (tracked separately)

    1. HEAD ignores Accept — curl -I (which this issue's repro used!) returns the stored content type no matter what Accept says, diverging from GET on the same resource. RFC 9110 HEAD/GET parity violation. Filed as conneg: HEAD ignores the Accept header — content-type diverges from GET on the same resource #552.
    2. Extensionless resources serve application/octet-stream ignoring Accept — already tracked as Content type is coupled to document extension #460 (content type coupled to document extension).

    Neither affects this issue's specific claim, which is about GET priority ordering and is fixed. Closing.

  2. added
    stale-fixedOpen issue whose described problem no longer reproduces on current main; verify and close
    on Jun 10, 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

    bugSomething isn't workingstale-fixedOpen issue whose described problem no longer reproduces on current main; verify and close

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL