[ckan-discuss] ANN: Simple Content Autonegotiation (F)CGI

Richard Cyganiak richard at cyganiak.de
Wed Oct 20 00:02:44 BST 2010


On 19 Oct 2010, at 18:27, William Waites wrote:
> Page is here: http://river.styx.org/ww/2010/10/autoneg/index
> Documentation and source linked from there.
> To see it in action, try out the following:
>  * curl -i http://river.styx.org/ww/2010/10/autoneg/index
>  * curl -i -H "Accept: text/html" http://river.styx.org/ww/2010/10/autoneg/index
>  * curl -i http://river.styx.org/ww/foaf
>  * curl -i -H "Accept: text/n3" http://river.styx.org/ww/foaf

As it happens, one of my hobbies is to inform implementors of content  
negotiation about how they screwed up.

Not much to inform about here though -- q values, wildcards,  
everything works! I'm impressed.

I recommend adding a Content-Location [1] and Vary [2] header to the  

> I am imagining that this could be used with, e.g. CKAN if
> different renderings of the resources (e.g. HTML, JSON, RDF)
> were pre-made.

Can't wait to see that!

Keep up the good work!


[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14
[2] http://pedantic-web.org/fops.html#conneg-vary

More information about the ckan-discuss mailing list