[DALI] error documents
Norman Gray
norman at astro.gla.ac.uk
Tue Oct 30 14:21:51 PDT 2012
Pat, hello.
On 30 Oct 2012, at 19:45, Patrick Dowler <patrick.dowler at nrc-cnrc.gc.ca> wrote:
> On the topic of Accept headers, I tried using that in the past but it is hard
> t make it work in practice. Some clients just have Accept: */* while others
> specify the different types with weights and such... it's kind of a mess I'd
> rather avoid in DALI :-)
I don't think it's really that bad.
I've implemented the whole server-side algorithm in under 170 lines of code, including weights and a from-scratch parser for the header. It took a certain amount of thought, and an assortment of test-cases, but I think it was still only a day's work or so. And if anyone's doing it in Java, there'd surely be pre-existing library support.
So I think I'd say 'slightly intricate' rather than a mess. And in exchange, it gives lots of flexibility to the client.
Also, supporting the Accept headers needn't be mandatory -- a server can say 'this is what I've got, take it or leave it'.
All the best,
Norman
--
Norman Gray : http://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK
More information about the dal
mailing list