[jax-rs-spec users] [jsr339-experts] Headers in ReaderInterceptor - read-only or not?

From: Marek Potociar <>
Date: Fri, 8 Feb 2013 11:35:08 +0100

Hello experts,

please review the issue bellow:

In summary, currently ReaderInterceptorContext.getHeaders() are documented to return a mutable header map. We have seen the use case in Jersey where mutability is useful. OTOH, Sergey argues that the returned headers should be immutable to avoid potential side-effects (see the issue comments for more reasoning).

Please share your opinion on the subj. so that we can resolve the issue.

Bill, interceptors is something that was inspired by RestEASY. What is your take on this? While the API docs of your MessageBodyReaderContext is, let's say, concise :) it is at least obvious that you provide a way how to modify Content-Type (via setMediaType()), which would be in line with the use case we saw in Jersey.

Looking forward to your feedback,