[ckan-dev] CKAN is mis-handling Accept header
Timothy Lebo
lebot at rpi.edu
Wed May 23 12:09:50 UTC 2012
Ross,
On May 23, 2012, at 6:51 AM, Ross Jones wrote:
>
> I realise that discussing 2616 is a bit of a mine field .. but ...
>
> On 21 May 2012, at 19:21, Timothy Lebo wrote:
>
>> The following returns HTML:
>>
>> curl -H "Accept: text/turtle,application/turtle,application/rdf+xml;q=0.8,text/plain;q=0.9,*/*;q=.5" http://thedatahub.org/dataset/farmers-markets-geographic-data-united-states
>>
>
> From my (probably rusty) understanding of Accept this actually says ….
>
> I would prefer text/turtle, or application/turtle. If you can't do that then I'll take text/plain(0.9), failing that send me application/rdf+xml(0.8) and if you still can't do that I'll take whatever you've got.
Yes, that is how I would interpret the Accept example.
> In our case whilst we don't have a turtle serialisation of the RDF and your client expressed a preference for text.
Sorry, text/plain is the mime for the NTRIPLES format. I could see how that could be confused with html.
I'll swap my scores for text/plain and application/rdf+xml so that there is no confusion.
>
> Having said all of that, I am fixing accept handling at present so will ensure it is doing the right thing,
Thanks!
> but I expect even with the correction to the qval it may still not work right now.
Acknowledged. After your fixes, I can try my tools out again, and tweak my Accept to suit.
Regards,
Tim
>
> Ross.
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
More information about the ckan-dev
mailing list