[jsr339-experts] Re: [jax-rs-spec users] get rid of getSize/Length
- From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen@...>
- To: jsr339-experts@...
- Subject: [jsr339-experts] Re: [jax-rs-spec users] get rid of getSize/Length
- Date: Thu, 31 May 2012 10:54:30 -0400
On May 30, 2012, at 2:35 PM, Bill Burke wrote:
> I'd like to get rid of or deprecate any getSize()/getLength() methods
> * MessageBodyWriter.getSize() should be deprecated and maybe have its
> language changed so that the value returned here is ignored, or at least,
> future implementations should always return -1. The reason for this is
> that the MBW should have full control on whether a Content-Length header is
> set or not and the JAX-RS runtime should not set this.
So, is your suggestion that all MBW's set Content-Length in writeTo?
> * ClientRequestContext.getLength() should be removed. Users will not (and
> should not) be setting a Content-Length header. Also, usually this value
> will never be known within a filter/interceptor invocation.
I tend to agree, yes.