You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Sarven Capadisli (JIRA)" <ji...@apache.org> on 2013/08/13 17:15:51 UTC
[jira] [Comment Edited] (JENA-510) Incorrect content negotiation
with */* in Accept header
[ https://issues.apache.org/jira/browse/JENA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13738339#comment-13738339 ]
Sarven Capadisli edited comment on JENA-510 at 8/13/13 3:15 PM:
----------------------------------------------------------------
I expect:
* largest q-value to win (in case of a tie, the latter (?) content-type)
* the output mime type should be consistent for a similar header (where highest q-value wins):
{noformat}
application/sparql-results+json;q=0.9, */*;q=0.1 => text/csv
application/sparql-results+xml;q=0.9, */*;q=0.1 => application/sparql-results+json
{noformat}
was (Author: csarven):
I expect:
* largest q-value to win (in case of a tie, more specific content-type)
* the output mime type should be consistent for a similar header (where highest q-value wins):
{noformat}
application/sparql-results+json;q=0.9, */*;q=0.1 => text/csv
application/sparql-results+xml;q=0.9, */*;q=0.1 => application/sparql-results+json
{noformat}
> Incorrect content negotiation with */* in Accept header
> -------------------------------------------------------
>
> Key: JENA-510
> URL: https://issues.apache.org/jira/browse/JENA-510
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ, Fuseki, TDB
> Affects Versions: Jena 2.10.2
> Reporter: Sarven Capadisli
>
> If I'm not mistaken, when */* content type is used in Accept header, content negotiation is incorrect. For curl -X GET http://sparql.org/books/sparql?query=SELECT+*+WHERE+%7B+%3Fs+%3Fp+%3Fo+%7D+LIMIT+1 compare:
> {noformat}
> application/sparql-results+json => application/sparql-results+json
> application/sparql-results+json;q=0.1 => application/sparql-results+json
> */* => application/sparql-results+json
> */*;q=0.1 => application/sparql-results+json
> application/sparql-results+json;q=0.1, */*;q=0.9 => application/sparql-results+json
> application/sparql-results+json;q=0.9, */*;q=0.1 => text/csv
> application/sparql-results+json;q=0.9, */*;q=0.9 => text/csv
> {noformat}
> It appears to be that, if the q-value of these two content-types are compared, the output content-type is incorrect.
> Here is an awkward one:
> {noformat}
> application/sparql-results+xml;q=0.1, */*;q=0.9 => application/sparql-results+json
> application/sparql-results+xml;q=0.9, */*;q=0.1 => application/sparql-results+json
> application/sparql-results+xml;q=0.9, */*;q=0.9 => application/sparql-results+json
> {noformat}
> What's going on now?
> Just for completeness:
> {noformat}
> application/sparql-results+xml;q=0.1, application/sparql-results+json;q=0.9 => application/sparql-results+json
> application/sparql-results+xml;q=0.9, application/sparql-results+json;q=0.1 => application/sparql-results+xml
> application/sparql-results+xml;q=0.9, application/sparql-results+json;q=0.9 => application/sparql-results+json
> {noformat}
> That looks okay.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira