W3C home > Mailing lists > Public > public-schemaorg@w3.org > September 2016

Re: JSON-LD context of schema.org down ?

From: Richard Wallis <rjw@dataliberate.com>
Date: Fri, 16 Sep 2016 16:27:36 +0100
Cc: Alexandre Bertails <bertails@apple.com>, "schema.org Mailing List" <public-schemaorg@w3.org>
Message-Id: <D2EAD094-755F-487E-92F7-04DD0C281A87@dataliberate.com>
To: Thomas Francart <thomas.francart@sparna.fr>
The 302 redirect was introduced [if I remember correctly] in version 3.0 to overcome issues with some clients confusing cache controls between requested format types. 

~Richard


> On 16 Sep 2016, at 15:56, Thomas Francart <thomas.francart@sparna.fr> wrote:
> 
> Thanks
> 
> Using an extra flag to follow redirects actually works :
> 
> curl -L --header "Accept: application/ld+json" http://schema.org
> 
> Thomas
> 
> 
> 2016-09-16 16:54 GMT+02:00 Alexandre Bertails <bertails@apple.com>:
>> I noticed a redirect was introduced a few days ago:
>> 
>> [[
>> ➜ http HEAD http://schema.org Accept:application/ld+json
>> HTTP/1.1 302 Found
>> Access-Control-Allow-Origin: *
>> Age: 18
>> Cache-Control: public, max-age=600
>> Content-Length: 0
>> Content-Type: text/html; charset=utf-8
>> Date: Fri, 16 Sep 2016 14:52:21 GMT
>> Location: http://schema.org/docs/jsonldcontext.json
>> Server: Google Frontend
>> Vary: Accept, Accept-Encoding
>> X-Cloud-Trace-Context: 04558cad20e4b9047bcaf137b8e11852
>> ]]
>> 
>> It wasn't there before and I've had to update my software too.
>> 
>> I bet most libraries are not expecting to follow redirects either.
>> 
>> Best,
>> Alexandre
>> 
>> > On Sep 16, 2016, at 7:48 AM, Thomas Francart <thomas.francart@sparna.fr> wrote:
>> >
>> > Hello
>> >
>> > I remember this worked a few weeks ago :
>> >
>> > curl --header "Accept: application/ld+json" http://schema.org
>> >
>> > Now it doesn't.
>> >
>> > And any JSON-LD declaring "@context" : "http://schema.org" can't be parsed anymore :
>> >
>> > "Caused by: com.github.jsonldjava.core.JsonLdError: loading remote context failed: http://schema.org"
>> >
>> > Any idea what can go wrong ?
>> > Is there any best practice or workaround for caching a JSON-LD context ?
>> >
>> > Cheers
>> > Thomas
>> >
>> > --
>> >
>> > Thomas Francart - SPARNA
>> > Web de données | Architecture de l'information | Accès aux connaissances
>> > blog : blog.sparna.fr, site : sparna.fr, linkedin : fr.linkedin.com/in/thomasfrancart
>> > tel :  +33 (0)6.71.11.25.97, skype : francartthomas
> 
> 
> 
> -- 
> 
> Thomas Francart - SPARNA
> Web de données | Architecture de l'information | Accès aux connaissances
> blog : blog.sparna.fr, site : sparna.fr, linkedin : fr.linkedin.com/in/thomasfrancart
> tel :  +33 (0)6.71.11.25.97, skype : francartthomas
Received on Friday, 16 September 2016 15:28:17 UTC

This archive was generated by hypermail 2.3.1 : Friday, 16 September 2016 15:28:17 UTC