Tom Johnson created MARMOTTA-585:
------------------------------------
Summary: SPARQL pessimistically rejects first ctype in Accept
header
Key: MARMOTTA-585
URL: https://issues.apache.org/jira/browse/MARMOTTA-585
Project: Marmotta
Issue Type: Bug
Affects Versions: 3.3.0
Reporter: Tom Johnson
Priority: Minor
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
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)