From: Undeen, D. <Don...@me...> - 2008-05-29 19:58:22
|
If it's a matter of me sending the correct Accept header, then why does this site work correctly? http://www4.wiwiss.fu-berlin.de/dblp/page/person/100007 ( I noticed that this site sends RDF, and mine sends n3) Could you tell me how to custom the Accept header on my (client) end? And if I have to do something on my end to customize the header, how do you apply this so it works for anyone who visits my data? Is there a way to just tell the server "don't negotiate content, just send RDF/XML ? -----Original Message----- From: Richard Cyganiak [mailto:ri...@cy...] Sent: Thursday, May 29, 2008 3:45 PM To: Undeen, Don Cc: d2r...@li... Subject: Re: [d2rq-dev] d2rq and piggy bank - text/plain Don, This is probably related to the Accept header used by your HTTP client. D2R Server v0.4 supports content negotiation and will serve either RDF/XML (as application/rdf+xml), N3 (as text/rdf+n3) or N- Triples (as text/plain), depending on what the client asks for. So, to really get RDF/XML, send an Accept header that indicates a preference for RDF/XML (e.g. "Accept: application/rdf+xml"). Note: typical Web browsers prefer anything text/* over application/rdf +xml, so you will get text/something if you click the RDF icon on a D2R Server page. I have to admit that the overall behaviour is far from perfect, e.g. the <link rel="alternate"> header in all pages promises application/rdf +xml, but in a typical Web browser you will actually get a different type. And there is no way to actually force a particular type (e.g. by appending ?output=rdfxml or so). This needs improvement in future versions. Richard On 29 May 2008, at 19:54, Undeen, Don wrote: > Sorry, lemme post the full headers of the two sites: > Mine: > Cache-Control: no-cache > Pragma: no-cache > X-Joseki-Server: Joseki-3.0-dev > Content-Type: text/plain; charset=utf-8 > Transfer-Encoding: chunked > Server: Jetty(6.1.4) > > 200 OK > > > The working site: > Via: 1.1 SPMETIS03 > Connection: Keep-Alive > Proxy-Connection: Keep-Alive > Transfer-Encoding: chunked > Date: Thu, 29 May 2008 18:48:41 GMT > Content-Type: application/rdf+xml; charset=utf-8 > Server: Jetty(6.1.1) > Cache-Control: no-cache > Pragma: no-cache > X-Joseki-Server: Joseki-3.0-dev > Keep-Alive: timeout=5, max=100 > > 200 OK > > > From: d2r...@li... [mailto:d2r...@li... > ] On Behalf Of Undeen, Don > Sent: Thursday, May 29, 2008 2:53 PM > To: d2r...@li... > Subject: Re: [d2rq-dev] d2rq and piggy bank - text/plain > > Hi, I just read this post: > http://sourceforge.net/mailarchive/message.php?msg_id=2AB38E62-B471-4096 -8BBD-19E53B391179%40cyganiak.de > > which seems to imply that RDF had been being served as text/plain, > and this was being fixed that same day. > However, when I load an rdf page, like: > http://localhost:2020/data/dbo.Objects/100 (sorry, not my data, > can't make it public yet) > > and look at the response headers, it says: > Content-Type: text/plain; charset=utf-8 > > > > I'm using d2r-server 0.4 > > However, if I go to this other d2r-served site: > http://www4.wiwiss.fu-berlin.de/dblp/page/person/100007 > > and then go to the rdf page: > http://www4.wiwiss.fu-berlin.de/dblp/data/person/100007 > > I see > Content-Type: application/rdf+xml; charset=utf-8 > > > Is this something I can fix/configure on my end? > Thanks! > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_________________ ______________________________ > d2rq-map-devel mailing list > d2r...@li... > https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel |