Uploaded image for project: 'Marmotta (Retired)'
  1. Marmotta (Retired)
  2. MARMOTTA-585

SPARQL pessimistically rejects first ctype in Accept header

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.3.0
    • None
    • None
    • None

    Description

      When more than one Accept header is sent, the SPARQL server rejects the request with "no result format specified or unsupported result format" if the first one is not supported.

      For example, the first two requests succeed but the third fails:

      `curl -v -H "Accept: text/n3" http://localhost:8983/marmotta/sparql/select?query="CONSTRUCT+%7B+%3Fs+%3Fp+%3Fo+.%7D+WHERE%7B+%3Fs+%3Fp+%3Fo+.+%7D"`

      `curl -v -H "Accept: text/n3, text/plain" http://localhost:8983/marmotta/sparql/select?query="CONSTRUCT+%7B+%3Fs+%3Fp+%3Fo+.%7D+WHERE%7B+%3Fs+%3Fp+%3Fo+.+%7D"`

      `curl -v -H "Accept: text/plain, text/n3" http://localhost:8983/marmotta/sparql/select?query="CONSTRUCT+%7B+%3Fs+%3Fp+%3Fo+.%7D+WHERE%7B+%3Fs+%3Fp+%3Fo+.+%7D"`

      This is a problem, for example, for the Ruby SPARQL::Client, which adds supported serializations to the Accept headers when their respective parsers are loaded. See workaround, here: https://github.com/dpla/rdf-marmotta/pull/5/files

      Attachments

        Activity

          People

            Unassigned Unassigned
            no_reply Tom Johnson
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: