Re: wrong content type for sparql test suite files

* Arjohn Kampman <arjohn.kampman@aduna-software.com> [2007-12-12 20:36+0100]
>
> Dear WG,
>
> The w3c server reports incorrect content types for the test suite files,
> which causes my revised compliance test to fail. This is what w3.org
> currently reports:
>
> .rq  --> text/plain
> .ttl --> text/rdf+n3; qs=0.89
> .srx --> text/plain
>
> I guess that the content type for .rq files is OK, but the other two are
> not. Turtle files should either have application/turtle or
> application/x-turtle, SPARQL result files should have
> application/sparql-results+xml.
>
> So far, everything's OK for my compliance test as the turtle files are
> happily parsed by the N3 parser. However, things go wrong with the i18n
> tests. Turtle files in this directory are reported as
> text/plain; charset=utf-8 instead.

of course, this media type is wrong, but out of curiousity, what mechanically went wrong when you GOT 

> Would it be possible to fix the the reported MIME type? Please at least
> consider to change the type for the i18n Turtle files to be in
> accordance with the rest of the Turtle files.

There was a broken .htaccess (courtesy of me, no doubt) in i18n:
[[
<Files ~ ".*.ttl">
ForceType "text/plain; charset=utf-8"
</Files>
<Files ~ ".*.rq">
ForceType "application/sparql-query; charset=utf-8"
</Files>
]]

I created one for data-rq that appears to fix things:
[[
<Files ~ ".*\.srx$">
ForceType 'application/sparql-results+xml'
</Files>
<Files ~ ".*\.ttl$">
ForceType 'application/x-turtle'
</Files>
<Files ~ ".*\.rq$">
ForceType 'application/sparql-query'
</Files>
]]

and it appears to:
[[
$ for U in http://www.w3.org/2001/sw/DataAccess/tests/data-r2/{algebra/two-nested-opt.{ttl,rq,srx},i18n/kanji{.ttl,-01{.rq,-results.ttl}}}; do echo -n $U && (HEAD $U | grep ^Content-Type: | sed s/^Content-Type://1); done
http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/two-nested-opt.ttl application/x-turtle
http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/two-nested-opt.rq application/sparql-query
http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/two-nested-opt.srx application/sparql-results+xml
http://www.w3.org/2001/sw/DataAccess/tests/data-r2/i18n/kanji.ttl application/x-turtle
http://www.w3.org/2001/sw/DataAccess/tests/data-r2/i18n/kanji-01.rq application/sparql-query
http://www.w3.org/2001/sw/DataAccess/tests/data-r2/i18n/kanji-01-results.ttl application/x-turtle
]]

Note that the media type for turtle is not yet registered and is subject
to much text/ debate:
  http://lists.w3.org/Archives/Public/www-archive/2007Dec/thread#msg65
  http://www.alvestrand.no/pipermail/ietf-types/2007-December/thread.html#1949
  http://www.alvestrand.no/pipermail/ietf-types/2007-December/thread.html#1945
so it may change underneath you (as expected for x- media types).

> Thanks,
>
> Arjohn
>
> -- 
> Arjohn Kampman, Senior Software Engineer
> Aduna - Guided Exploration
> www.aduna-software.com

-- 
-eric

office: +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
mobile: +1.617.599.3509

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Wednesday, 19 December 2007 07:02:21 UTC