I was querying a SPARQL endpoint that defaults to application/x-trig for the media type, but can also serve application/rdf+xml. SPARQL module can not parse x-trig.
Even after adding rdf+xml to the formats in the accept header, the default (x-trig) was still returned because the wildcard was appended to the end of the formats. An accept parameter needed to be added to the wildcard to assert the order of preference for media types.
Because rdf+xml is a commonly used media type and it can be parsed by SPARQL module, I believe it should be added to the default formats in the module. The wildcard should also have an accept parameter set with a low value so an un-parsable default is less likely to be returned.
Patch will be posted shortly.
(Thanks to Richard Cyganiak who helped me debug this).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | sparql-mediatype_wildcard-659630-01.patch | 1.22 KB | linclark |
Comments
Comment #1
Anonymous (not verified) commentedThis solved the problem for me.
Comment #2
Anonymous (not verified) commented