500 Internal Server Error Response when using a HTTP client but not from web interface

408 views
Skip to first unread message

Rob Vesse

unread,
Mar 4, 2010, 10:37:19 AM3/4/10
to n2-dev
So I was playing with the HTTP connector for Talis which I have in the
dotNetRDF API (a C# library for RDF I develop) and I noticed something
strange that when I issue a CONSTRUCT/DESCRIBE query I get a 500
Internal Server Error response but if I go to the web interface of the
store at http://api.talis.com/stores/{storename}/services/sparql and
issue the same query there I can a valid result back.

My guess is that Talis is balking at my libraries accept header which
lists a whole load of MIME types including some that the platform
doesn't support and this might be the cause the error - or it could be
something else entirely?

Sample queries are the following and executed against the space store
(http://api.talis.con/stores/space/) Leigh demo'd at the London Linked
Data Meetup:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX space: <http://purl.org/net/schemas/space/>

DESCRIBE ?spacecraft WHERE
{
?launch a space:Launch ;
space:spacecraft ?spacecraft ;
space:launched ?launched .
FILTER(?launched > "2010-01-01"^^xsd:date)
} LIMIT 10

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX space: <http://purl.org/net/schemas/space/>

CONSTRUCT
{
?spacecraft space:launched ?launched .
}
WHERE
{
?launch a space:Launch ;
space:spacecraft ?spacecraft ;
space:launched ?launched .
FILTER(?launched > "2009-01-01"^^xsd:date)
}

The accept header my library sends is the following:

application/rdf+xml,text/xml,text/n3,text/rdf+n3,text/
turtle,application/x-turtle,application/turtle,text/plain,application/
json;q=0.9,*/*;q=0.8

Cheers,
Rob Vesse

Rob Vesse

unread,
Mar 4, 2010, 10:50:24 AM3/4/10
to n2-dev
This is definitely some kind of issue with the Accept header - when I
change the code base to only send application/rdf+xml as the accept
header I get a response back fine

Rob

ajmg

unread,
Mar 5, 2010, 5:35:26 AM3/5/10
to n2-dev

Hi Rob

I've updated the ticket you raised - see http://talisplatform.zendesk.com/tickets/64.
This is a known issue and the workaround for the moment is to remove
text/turtle from the accept header.

cheers
Amanda

Rob Vesse

unread,
Mar 11, 2010, 10:30:03 AM3/11/10
to n2-dev
Thanks Amanda

I have made this change as a workaround and pushed it out as part of
the new release of my API

Rob

Reply all
Reply to author
Forward
0 new messages