[
https://issues.apache.org/jira/browse/JENA-656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13939130#comment-13939130
]
Rob Vesse edited comment on JENA-656 at 3/18/14 12:38 PM:
----------------------------------------------------------
More general headers sent by badly behaving/configured servers like
{{application/json}} and {{application/xml}} are already handled internally (at
least in some places) though as you point out {{QueryEngineHTTP}} is not one of
them.
The problem is we don't want to encourage bad behaviour so either we don't send
them like we do currently or we should send them with low quality factors e.g.
{noformat}
application/sparql-results+xml,application/xml;q=0.1
{noformat}
The other problem is that when a server sends a broader content type we can't
guarantee that it really meant {{application/sparql-results+xml}} not
{{application/xml}} until we try and parse it by which point if we've picked
incorrectly we're too late.
You should also consider reporting bugs to the relevant services about their
incorrect behaviour.
was (Author: rvesse):
More general headers sent by badly behaving/configured servers like
{{application/json}} and {{application/xml}} are already handled internally (at
least in some places).
The problem is we don't want to encourage bad behaviour so either we don't send
them like we do currently or we should send them with low quality factors e.g.
{noformat}
application/sparql-results+xml,application/xml;q=0.1
{noformat}
> Doesn't send all accepted mime types in header
> ----------------------------------------------
>
> Key: JENA-656
> URL: https://issues.apache.org/jira/browse/JENA-656
> Project: Apache Jena
> Issue Type: Improvement
> Components: ARQ
> Affects Versions: Jena 2.11.1
> Reporter: Natanael Arndt
> Attachments: 0001-Fix-JENA-656.-Improve-mime-type-handling.patch
>
>
> The Jena HTTP query engine doesn't send all the mime types it can process in
> the accept header. It would be better if it could send all of them, so
> services can send a better response.
> Currently the HTTP-Accept-Header claims that jena can only accept
> "application/sparql-results+xml" resp. "application/rdf+xml" as query result.
> In fact it can process much more types.
> Furthermore some services [1] will return a more general content-type in the
> header when answering a request (e.g. "application/json" instead of
> "application/sparql-results+xml" or "application/xml" instead of
> "application/rdf+xml"). It would be good to also try to parse such results
> and to see if the content can be interpreted as SPARQL result.
> [1] http://rdf.myexperiment.org/sparql/
--
This message was sent by Atlassian JIRA
(v6.2#6252)