I would be careful with adding new semantics to standard HTTP headers,
but there are a few access points in OpenCMIS to do this.
On the client side you could implement your own authentication provider
to add and read HTTP headers. It's a bit tricky if the session is used
in multiple threads, though. You would have to work with ThreadLocals
here.
Alternatively, you can write your own HTTP invoker to get direct access
to the headers.
On the server side you get access to the HttpServletRequest and
HttpServletResponse objects through the call context. Reading and
setting headers in the server code shouldn't be a problem, but you
cannot set the HTTP status code. To get full control you have to extend
the AtomPub and Browser Binding servlets and override the methods
addResource (AtomPub) respectively addRepositoryResource and
addRootResource (Browser). Here you can override the handlers for the
calls/resources you are interested in and return to the client whatever
you like.
- Florian
On 3 April 2014 12:52, Florian Müller <[email protected]> wrote:
That makes an useful implementation difficult
I'd argue, that makes a *generic implementation* difficult, while a
vendor
specific extension is pretty easy to specify.
In some cases (e.g. what in the AtomPub binding is mapped to PUT
operations), it's trivial to provide a consistent (albeit vendor
specific)
semantic for If-Modified-Since even in the context of CMIS. As a
legit HTTP
extension, and as chemistry wraps HTTP, I would expect to be able to
implement it.
My question was among the lines of if and how chemistry provides
hooks for
such extensions to be built.
Thanks,
c.