# HG changeset patch # User Nicolas Chauvat # Date 1581091799 -3600 # Node ID 8fa3d2b0252d869ab00f17ea0a6f981d7878f0d2 # Parent 8e3fda2c60ef66608ab70350183df80efe08ffa4# Parent 50122959acbc5461abeb9a54573f7248f75b0f6a merge diff -r 8e3fda2c60ef -r 8fa3d2b0252d cubicweb/web/views/cwuser.py --- a/cubicweb/web/views/cwuser.py Sun Feb 02 23:01:01 2020 +0100 +++ b/cubicweb/web/views/cwuser.py Fri Feb 07 17:09:59 2020 +0100 @@ -57,7 +57,7 @@ title = _('foaf') templatable = False - content_type = 'text/xml' + content_type = 'application/rdf+xml' def call(self): self.w(u''' diff -r 8e3fda2c60ef -r 8fa3d2b0252d cubicweb/web/views/rdf.py --- a/cubicweb/web/views/rdf.py Sun Feb 02 23:01:01 2020 +0100 +++ b/cubicweb/web/views/rdf.py Fri Feb 07 17:09:59 2020 +0100 @@ -48,8 +48,8 @@ title = _('rdf export') templatable = False binary = True - format = 'xml' - content_type = 'text/xml' # +rdf + format = 'xml' # or maybe pretty-xml ? + content_type = 'application/rdf+xml' def call(self): graph = rdflib.Graph() @@ -104,6 +104,26 @@ class RDFN3View(RDFView): - __regid__ = 'n3rdf' + __regid__ = 'rdf.n3' format = 'n3' - content_type = 'text/n3' + content_type = 'text/n3' # see https://www.w3.org/TeamSubmission/n3/#mimetype + + class RDFTurtleView(RDFView): + __regid__ = 'rdf.turtle' + format = 'turtle' + content_type = 'text/turtle' # see https://www.w3.org/TR/turtle/#sec-mediaReg + + class RDFnquadsView(RDFView): + __regid__ = 'rdf.nquads' + format = 'nquads' + content_type = 'application/n-quads' # see https://www.w3.org/TR/n-quads/#sec-mediatype + + class RDFntriplesView(RDFView): + __regid__ = 'rdf.nt' + format = 'nt' + content_type = 'application/n-triples' # see https://www.w3.org/TR/n-triples/#n-triples-mediatype + + class RDFtrigView(RDFView): + __regid__ = 'rdf.trig' + format = 'trig' + content_type = 'application/trig' # see https://www.w3.org/TR/trig/#sec-mime