Skip to main content

[jax-rs-spec users] [jsr339-experts] get rid of getSize/Length

  • From: Bill Burke <bburke@...>
  • To: "jsr339-experts@..." <jsr339-experts@...>
  • Subject: [jax-rs-spec users] [jsr339-experts] get rid of getSize/Length
  • Date: Wed, 30 May 2012 14:35:38 -0400
  • List-id: <jsr339-experts.jax-rs-spec.java.net>

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.

* 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.



--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


[jax-rs-spec users] [jsr339-experts] get rid of getSize/Length

Bill Burke 05/30/2012

[jax-rs-spec users] [jsr339-experts] Re: get rid of getSize/Length

Sergey Beryozkin 05/31/2012

[jax-rs-spec users] [jsr339-experts] Re: get rid of getSize/Length

Santiago Pericas-Geertsen 05/31/2012

[jax-rs-spec users] [jsr339-experts] Re: get rid of getSize/Length

Bill Burke 05/31/2012
 
 
Close
loading
Please Confirm
Close