[jax-rs-spec users] [jsr339-experts] Should null values in client entity variant overwrite Content-* headers?

From: Marek Potociar <>
Date: Tue, 5 Nov 2013 20:28:15 +0100

Fellow experts,

Please take a look at this SO entry (and my answer):

While the javadoc in the JAX-RS client API is clear that:

"Any variant-related HTTP headers previously set (namelyContent-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information."

I am still curious if we should consider null to be a "variant information". IOW, whether we should overwrite those Content-* headers that are set if we only have null in stored for the header in the variant instance. Jersey currently always overwrites all these headers.
What are you doing in your implementations in this case?