W3C home > Mailing lists > Public > public-schemaorg@w3.org > April 2019

Re: content negotiation isn't working

From: Richard Wallis <richard.wallis@dataliberate.com>
Date: Wed, 10 Apr 2019 12:57:14 +0100
Message-ID: <CAD47Kz5axBMEdQqtcngCOFjYEa+OmXFhyHKTQ9t0WYm7StVJ0w@mail.gmail.com>
To: Mark Wilkinson UPM <mark.wilkinson@upm.es>
Cc: "schema.org Mailing List" <public-schemaorg@w3.org>
Hi Mark,

As the implementer of that bit of code, I am certain that that it does not "
*incrementally go through the types until the server finds one that it is
happy with*".

I have raised an issue <https://github.com/schemaorg/schemaorg/issues/2206> to
track this which hopefully will lead to a fix in an upcoming release.

~Richard
Richard Wallis
Founder, Data Liberate
http://dataliberate.com
Linkedin: http://www.linkedin.com/in/richardwallis
Twitter: @rjw



On Wed, 10 Apr 2019 at 12:45, Mark Wilkinson UPM <mark.wilkinson@upm.es>
wrote:

> Hi Richard,
>
> Thanks for the rapid reply.
>
> Yes, if I limit the Accept header to only a single content-type, it
> works.  It's a problem if I put all content types together (which is
> what the software I am using does).
>
> I think the "correct behaviour" is to incrementally go through the types
> until the server finds one that it is happy with...
>
> Mark
>
>
> On 4/10/19 1:26 PM, Richard Wallis wrote:
> > Hi Mark,
> >
> > I have just tested this, using curl.   Although I did not get the
> > required output for /*all*/ the accept types you listed I did get the
> > correct output serialisations for the types listed on the developers
> > page <https://schema.org/docs/developers.html#conneg>:
> >
> >  *
> >
> >     curl-s -L --header "Accept: application/ld+json"
> >     http://schema.org/Book
> >
> >  *
> >
> >     curl-s -L --header "Accept: application/rdf+xml"
> >     http://schema.org/Book
> >
> >  *
> >
> >     curl-s -L --header "Accept: text/plain" http://schema.org/Book
> >
> >  *
> >
> >     curl-s -L --header "Accept: application/x-turtle"
> >     http://schema.org/Book
> >
> >  *
> >
> >     curl-s -L --header "Accept: text/csv" http://schema.org/Book
> >
> > ~Richard
> >
> > Richard Wallis
> > Founder, Data Liberate
> > http://dataliberate.com
> > Linkedin: http://www.linkedin.com/in/richardwallis
> > Twitter: @rjw
> >
> >
> >
> > On Wed, 10 Apr 2019 at 12:07, Mark Wilkinson UPM
> > <mark.wilkinson@upm.es <mailto:mark.wilkinson@upm.es>> wrote:
> >
> >     Dear Schema-team,
> >
> >
> >     It appears that content negotiation isn't quite working properly for
> >     schema.org <http://schema.org> terms, as described in
> >     https://schema.org/docs/developers.html
> >
> >     The Accept header:  Accept: text/turtle, application/ld+json,
> >     application/rdf+xml, text/xhtml+xml, application/n3,
> >     application/rdf+n3,
> >     application/turtle, application/x-turtle, text/n3, text/turtle,
> >     text/rdf+n3, text/rdf+turtle, application/n-triples
> >
> >     includes several of the content-types that you provide, but calls
> >     using
> >     that header return HTML...
> >
> >
> >     Am I misunderstanding?
> >
> >
> >     Mark
> >
> >
> >
> >     --
> >     Dr. Mark D. Wilkinson
> >     BBVA-UPM Industry Chair on Biotechnology
> >     Isaac Peral Distinguished Researcher
> >     Centro de Biotecnología y Genómica de Plantas UPM-INIA (CBGP)
> >     Campus Montegancedo,
> >     Autopista M-40 (Km 38)
> >     28223-Pozuelo de Alarcón (Madrid)
> >
> >
> >     "The urge to save humanity is almost always a false front
> >     for the urge to rule it"
> >
> >                             -- H. L. Mencken
> >
> >
> --
> Dr. Mark D. Wilkinson
> BBVA-UPM Industry Chair on Biotechnology
> Isaac Peral Distinguished Researcher
> Centro de Biotecnología y Genómica de Plantas UPM-INIA (CBGP)
> Campus Montegancedo,
> Autopista M-40 (Km 38)
> 28223-Pozuelo de Alarcón (Madrid)
>
>
> "The urge to save humanity is almost always a false front
> for the urge to rule it"
>
>                         -- H. L. Mencken
>
>
Received on Wednesday, 10 April 2019 11:57:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:12:46 UTC