Open dayures opened 6 years ago
Looks like we could add better error handling for some edge-cases, like this one. The bad &format
value seems to divert handling of the Accept:
header value.
Meanwhile, I suggest you use the Accept:
header (where I think you'll agree that a MIME type is the correct value, rather than tsv
or any other alias) and leave the &format
out of the URI, as --
curl -I -H "Accept: text/tab-separated-values" "http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=SELECT+%3Flabel%0D%0AWHERE+%7B%0D%0A<http%3A%2F%2Fdbpedia.org%2Fresource%2FAsturias>+rdfs%3Alabel+%3Flabel+.%0D%0A%7D"
-- which gets me --
HTTP/1.1 200 OK
Date: Fri, 23 Feb 2018 17:12:54 GMT
Content-Type: text/tab-separated-values; charset=UTF-8
It looks like the the
Accept
header isn't being respectedcurl -I "http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=SELECT+%3Flabel%0D%0AWHERE+%7B%0D%0A<http%3A%2F%2Fdbpedia.org%2Fresource%2FAsturias>+rdfs%3Alabel+%3Flabel+.%0D%0A%7D&format=tsv"
returns Content-Type: application/sparql-results+xml; charset=UTF-8curl -H "Accept: text/tab-separated-values" -I "http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=SELECT+%3Flabel%0D%0AWHERE+%7B%0D%0A<http%3A%2F%2Fdbpedia.org%2Fresource%2FAsturias>+rdfs%3Alabel+%3Flabel+.%0D%0A%7D&format=tsv"
returns HTTP/1.1 406 UnacceptableRelated to #713